﻿:root {
  --ink: #20231f;
  --muted: #667064;
  --line: #deded6;
  --paper: #f8f7f1;
  --white: #fff;
  --soft: #eef0ec;
  --green: #63745d;
  --orange: #b96d47;
  --red: #b64f2d;
  --shadow: 0 14px 40px rgba(32, 35, 31, 0.1);
}

* {
  box-sizing: border-box;
}

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

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

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

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

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(248, 247, 241, 0.96);
  backdrop-filter: blur(12px);
}

.brand {
  font-size: 24px;
  font-weight: 900;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.pill,
.icon-pill {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.pill.active,
.pill:hover,
.icon-pill:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}

.hero-band {
  padding: 34px 18px 24px;
  background: var(--soft);
}

.inner {
  width: min(1180px, 100%);
  margin: 0 auto;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 14px;
  font-size: clamp(36px, 10vw, 72px);
  line-height: 1;
}

.lead {
  max-width: 700px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.quick-nav,
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.section {
  padding: 30px 18px;
}

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

.section-head h2 {
  margin-bottom: 0;
  font-size: clamp(26px, 6vw, 42px);
}

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

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

.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 8px 26px rgba(32, 35, 31, 0.06);
}

.card-body {
  padding: 15px;
}

.product-image {
  aspect-ratio: 1 / 1;
  background: var(--soft);
}

.meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.price {
  color: var(--red);
  font-size: 20px;
  font-weight: 900;
}

.btn {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ink);
  border-radius: 3px;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--white);
  cursor: pointer;
  font-weight: 900;
}

.btn.secondary {
  background: var(--white);
  color: var(--ink);
}

.btn.warn {
  border-color: var(--orange);
  background: var(--orange);
}

.btn.full {
  width: 100%;
}

.layout {
  display: grid;
  gap: 18px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--white);
}

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

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 9px 11px;
  background: var(--white);
}

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

.image-picker {
  display: grid;
  gap: 8px;
}

.image-picker label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.pick-box {
  position: relative;
  display: grid;
  min-height: 108px;
  place-items: center;
  overflow: hidden;
  border: 1px dashed #aeb4ad;
  border-radius: 8px;
  background: var(--soft);
  cursor: pointer;
}

.pick-box input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.plus-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}

.pick-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pick-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-frame {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  aspect-ratio: 16 / 9;
  background: #111;
}

.video-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.table-wrap {
  overflow-x: auto;
}

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

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

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

.status {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--soft);
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 30;
  display: none;
  width: min(440px, 100%);
  padding: 18px;
  background: var(--white);
  box-shadow: var(--shadow);
  overflow: auto;
}

.drawer.open {
  display: block;
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}

.line-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.line-item img {
  aspect-ratio: 1 / 1;
  border-radius: 4px;
}

.totals {
  display: grid;
  gap: 8px;
  margin: 16px 0;
}

.totals div {
  display: flex;
  justify-content: space-between;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  max-width: min(360px, calc(100% - 36px));
  transform: translateY(16px);
  opacity: 0;
  border-radius: 6px;
  padding: 13px 16px;
  background: var(--ink);
  color: var(--white);
  pointer-events: none;
  transition: 0.2s ease;
}

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

.admin-shell {
  display: grid;
}

.admin-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.admin-main {
  padding: 20px 18px 60px;
}

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

.stat {
  padding: 16px;
  border-radius: 8px;
  background: var(--soft);
}

.stat strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
}

.hidden {
  display: none !important;
}

@media (min-width: 760px) {
  .product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .layout {
    grid-template-columns: 1.3fr 0.7fr;
  }

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

  .admin-shell {
    grid-template-columns: 260px 1fr;
  }

  .admin-nav {
    min-height: 100vh;
    align-content: start;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .admin-main {
    padding: 28px;
  }

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