:root {
  --ink: #171717;
  --muted: #686868;
  --line: #dedbd4;
  --panel: #f7f5f0;
  --canvas: #fbfaf7;
  --white: #ffffff;
  --accent: #16785f;
  --accent-ink: #0e4d3e;
  --warn: #b25722;
  --shadow: 0 18px 40px rgba(40, 35, 26, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

body[data-view="home"] {
  background:
    radial-gradient(circle at 50% 34%, rgba(24, 24, 24, 0.06), transparent 18%),
    linear-gradient(180deg, #ffffff 0%, #ffffff 62%, #f7f7f5 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 276px minmax(0, 1fr);
  min-height: 100vh;
}

body[data-view="home"] .app-shell {
  display: block;
}

body[data-view="home"] .sidebar {
  display: none;
}

.sidebar {
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.84);
  padding: 28px 22px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand-block {
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 48px;
  background: var(--ink);
  color: var(--white);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-name,
.brand-meta,
.eyebrow,
.sidebar-note p,
.metric p,
.section-head p {
  margin: 0;
}

.brand-name {
  font-size: 17px;
  font-weight: 760;
}

.brand-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.nav-list {
  display: grid;
  gap: 8px;
  margin-top: 36px;
}

.nav-item {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 13px 14px;
  text-align: left;
  font-weight: 700;
}

.nav-item.active,
.nav-item:hover {
  background: var(--panel);
  border-color: var(--line);
  color: var(--ink);
}

.sidebar-note {
  margin-top: 34px;
  padding: 18px;
  background: #eef6f2;
  border: 1px solid #c8ded4;
}

.note-label,
.eyebrow {
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-note p {
  margin-top: 10px;
  color: #355d51;
  font-size: 14px;
  line-height: 1.55;
}

.main-panel {
  padding: 34px 38px 56px;
}

body[data-view="home"] .main-panel {
  min-height: 100vh;
  padding: 0 28px;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  margin: 0 auto;
  max-width: 780px;
  font-size: clamp(34px, 3.7vw, 58px);
  line-height: 1.12;
  letter-spacing: 0;
  font-weight: 820;
}

.hero-copy {
  display: grid;
  justify-items: center;
  width: 100%;
  max-width: 1100px;
  text-align: center;
}

.hero-subline {
  max-width: 760px;
  margin: 18px 0 0;
  color: #62635f;
  font-size: clamp(16px, 1.25vw, 21px);
  font-weight: 650;
  line-height: 1.55;
}

.home-view {
  position: relative;
  display: none;
  min-height: 100vh;
  place-items: center;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.home-view.active {
  display: grid;
}

.home-status {
  position: absolute;
  top: 46px;
  right: 54px;
  color: #4f504c;
  font-size: 16px;
  font-weight: 680;
}

.home-status strong {
  color: var(--ink);
  font-size: 20px;
  font-weight: 850;
}

.home-status span {
  color: var(--accent);
  font-weight: 820;
}

.contact-us {
  position: absolute;
  right: 54px;
  bottom: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 132px;
  min-height: 46px;
  border: 1px solid #d9d9d2;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  font-weight: 780;
  box-shadow: 0 14px 34px rgba(32, 32, 28, 0.08);
}

.contact-us:hover {
  border-color: #bfc4bb;
  transform: translateY(-1px);
}

.home-brand {
  display: grid;
  justify-items: center;
  gap: 14px;
  margin-bottom: 38px;
}

.home-mark {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border: 1px solid #e7e7e2;
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(242, 242, 237, 0.86)),
    #ffffff;
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  color: #1f1f1d;
  font-size: 42px;
  font-weight: 780;
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
}

.home-brand p {
  margin: 0;
  color: #5e5e58;
  font-size: 16px;
  font-weight: 760;
  letter-spacing: 0.08em;
}

.entry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 22px;
  justify-content: center;
  width: 100%;
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
  margin-top: min(11vh, 86px);
}

.entry-card {
  position: relative;
  overflow: hidden;
  min-height: 174px;
  border: 1px solid #e7e7e1;
  border-radius: 10px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(246, 247, 244, 0.8)),
    #ffffff;
  color: var(--ink);
  padding: 28px;
  text-align: left;
  box-shadow: 0 20px 48px rgba(32, 32, 28, 0.08);
  transition:
    border-color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.entry-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(22, 120, 95, 0.13), transparent 36%),
    linear-gradient(315deg, rgba(42, 82, 190, 0.16), transparent 42%);
  opacity: 0.58;
}

.entry-card::after {
  content: "↗";
  position: absolute;
  right: 26px;
  bottom: 22px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: #171717;
  color: #ffffff;
  font-size: 21px;
  font-weight: 800;
}

.entry-card span {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 320px;
  font-size: clamp(23px, 1.8vw, 30px);
  font-weight: 850;
  line-height: 1.18;
}

.entry-card small {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 310px;
  margin-top: 16px;
  color: #5f615d;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.45;
}

.entry-card:hover {
  border-color: #c7cbc4;
  transform: translateY(-4px);
  box-shadow: 0 28px 64px rgba(32, 32, 28, 0.12);
}

.primary-btn,
.ghost-btn,
.small-btn,
.segment {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  min-height: 40px;
  padding: 0 15px;
  font-weight: 760;
}

.primary-btn {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--white);
}

.ghost-btn:hover,
.small-btn:hover,
.segment:hover {
  border-color: var(--accent);
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 34px 0 24px;
}

.metric {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  padding: 18px;
}

.metric span {
  display: block;
  font-size: 32px;
  font-weight: 840;
}

.metric p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.view {
  display: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  padding: 42px;
}

.view.active {
  display: block;
}

.hidden {
  display: none !important;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 26px;
}

.section-actions {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.section-head h2 {
  font-size: 34px;
  line-height: 1.15;
}

.section-head p {
  margin-top: 7px;
  color: var(--muted);
  line-height: 1.45;
}

.segmented {
  display: flex;
  border: 1px solid var(--line);
}

.segment {
  border: 0;
  min-width: 82px;
}

.segment.active {
  background: var(--ink);
  color: var(--white);
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px;
  gap: 12px;
  margin-bottom: 18px;
}

label {
  display: grid;
  gap: 8px;
}

label span,
.search-box span,
.filter-box span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  min-height: 42px;
  padding: 10px 12px;
  outline: none;
}

textarea {
  min-height: 112px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(22, 120, 95, 0.12);
}

.list-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.item-card {
  border: 1px solid var(--line);
  background: var(--white);
  padding: 18px;
}

.card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.card-title {
  font-size: 19px;
  font-weight: 820;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 14px 0;
}

.tag {
  border: 1px solid #cfd8d4;
  background: #f4faf7;
  color: #24594c;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 760;
}

.status {
  white-space: nowrap;
  border: 1px solid var(--line);
  padding: 4px 8px;
  height: 28px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.card-body {
  color: #383838;
  line-height: 1.55;
  min-height: 72px;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
}

.card-proof {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.small-btn {
  min-height: 34px;
  padding: 0 12px;
  flex-shrink: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 24px;
}

.form-grid .wide,
.form-submit {
  grid-column: 1 / -1;
}

.form-submit {
  justify-self: start;
  margin-top: 6px;
}

.review-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
}

.review-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
  background: var(--white);
}

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

.review-table th {
  background: var(--panel);
  color: var(--muted);
  font-weight: 780;
}

.review-actions {
  display: flex;
  gap: 8px;
}

.contact-log {
  margin-top: 20px;
}

.contact-log h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.log-item {
  border: 1px solid var(--line);
  background: var(--white);
  padding: 14px;
  margin-bottom: 10px;
  line-height: 1.5;
}

dialog {
  width: min(560px, calc(100vw - 32px));
  border: 1px solid var(--line);
  padding: 0;
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.28);
}

.dialog-card {
  display: grid;
  gap: 16px;
  padding: 24px;
  position: relative;
}

.account-card {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 28px;
  position: relative;
  text-align: center;
}

.dialog-card h2 {
  font-size: 24px;
}

.account-card h2 {
  font-size: 26px;
}

.account-note {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 650;
}

.douyin-code {
  display: block;
  width: min(360px, 82vw);
  height: auto;
  border-radius: 14px;
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: 0;
  background: transparent;
  font-size: 26px;
  line-height: 1;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: var(--ink);
  color: var(--white);
  padding: 12px 16px;
  opacity: 0;
  transform: translateY(10px);
  transition: 0.2s ease;
  pointer-events: none;
  font-weight: 740;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.empty-state {
  border: 1px dashed var(--line);
  background: var(--panel);
  padding: 34px;
  color: var(--muted);
  text-align: center;
  grid-column: 1 / -1;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .topbar,
  .section-head {
    flex-direction: column;
  }

  .metric-row,
  .list-grid,
  .form-grid,
  .entry-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 620px) {
  .main-panel {
    padding: 24px 16px 42px;
  }

  body[data-view="home"] .main-panel {
    padding: 0 18px;
  }

  h1 {
    font-size: 34px;
    max-width: 360px;
  }

  .nav-list {
    grid-template-columns: 1fr 1fr;
  }

  .home-mark {
    width: 78px;
    height: 78px;
    border-radius: 20px;
    font-size: 36px;
  }

  .home-status {
    top: 20px;
    right: 18px;
    font-size: 13px;
  }

  .home-status strong {
    font-size: 16px;
  }

  .contact-us {
    right: 18px;
    bottom: 18px;
    min-width: 108px;
    min-height: 40px;
    font-size: 14px;
  }

  .entry-grid {
    margin-top: 54px;
    gap: 14px;
  }

  .entry-card {
    min-height: 136px;
    padding: 22px;
  }

  .entry-card::after {
    width: 36px;
    height: 36px;
    right: 20px;
    bottom: 18px;
  }
}
