:root {
  --ink: #17211c;
  --muted: #718077;
  --cream: #f4ede3;
  --white: #ffffff;
  --line: #dde2dc;
  --green: #795b45;
  --green-dark: #4b3528;
  --lime: #e3c79d;
  --orange: #ef7b45;
  --red: #cf4a48;
  --shadow: 0 20px 60px rgba(25, 45, 32, .11);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: Manrope, "Noto Sans SC", sans-serif;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
.shell { min-height: 100vh; }
.topbar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4vw;
  background: rgba(245, 242, 234, .92);
  border-bottom: 1px solid rgba(23,33,28,.08);
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(16px);
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: -.03em; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: var(--green); color: var(--lime); font-weight: 800;
}
.nav { display: flex; gap: 8px; align-items: center; }
.nav button, .ghost {
  border: 0; background: transparent; color: var(--ink); padding: 10px 15px; border-radius: 12px;
}
.nav button.active { background: var(--white); box-shadow: 0 5px 20px rgba(25,45,32,.08); }
.primary {
  border: 0; background: var(--green); color: white; padding: 12px 18px; border-radius: 13px; font-weight: 700;
}
.primary:hover { background: var(--green-dark); }
.badge { display: inline-grid; min-width: 20px; height: 20px; padding: 0 5px; place-items: center; border-radius: 20px; background: var(--lime); color: var(--green-dark); font-size: 11px; margin-left: 6px; }
.hero {
  margin: 28px 4vw 18px;
  border-radius: 28px;
  padding: 46px;
  min-height: 310px;
  background:
    radial-gradient(circle at 85% 20%, rgba(213,239,131,.65), transparent 28%),
    linear-gradient(135deg, #17442e, #2f7150);
  color: white;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -50px; bottom: -80px; width: 330px; height: 330px;
  border: 1px solid rgba(255,255,255,.22); border-radius: 50%; box-shadow: 0 0 0 50px rgba(255,255,255,.035), 0 0 0 100px rgba(255,255,255,.025);
}
.eyebrow { color: var(--lime); font-weight: 700; letter-spacing: .12em; font-size: 12px; }
.hero h1 { font-size: clamp(38px, 5vw, 66px); max-width: 720px; letter-spacing: -.055em; line-height: 1.03; margin: 18px 0; }
.hero p { max-width: 580px; color: rgba(255,255,255,.73); line-height: 1.75; }
.hero .primary { background: var(--lime); color: var(--green-dark); margin-top: 12px; }
.toolbar { padding: 18px 4vw; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.categories { display: flex; gap: 9px; overflow-x: auto; }
.chip { border: 1px solid var(--line); background: rgba(255,255,255,.5); padding: 9px 15px; border-radius: 99px; white-space: nowrap; }
.chip.active { background: var(--ink); border-color: var(--ink); color: white; }
.search { min-width: 260px; border: 1px solid var(--line); background: white; border-radius: 13px; padding: 11px 14px; outline: none; }
.grid { padding: 8px 4vw 60px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.product { background: var(--white); border-radius: 22px; padding: 14px; box-shadow: 0 7px 28px rgba(25,45,32,.06); transition: transform .2s; }
.product:hover { transform: translateY(-4px); }
.visual { border-radius: 16px; aspect-ratio: 1.16; display: grid; place-items: center; font-size: 64px; position: relative; overflow: hidden; }
.visual::after { content: ""; width: 100px; height: 100px; border-radius: 50%; background: rgba(255,255,255,.42); position: absolute; right: -25px; top: -25px; }
.stock-tag { position: absolute; left: 10px; top: 10px; font-size: 11px; background: rgba(255,255,255,.85); color: var(--ink); border-radius: 20px; padding: 6px 9px; z-index: 2; }
.product h3 { font-size: 16px; margin: 15px 2px 5px; }
.meta { color: var(--muted); font-size: 12px; }
.product-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.price { font-size: 21px; font-weight: 800; letter-spacing: -.03em; }
.add { width: 38px; height: 38px; border: 0; border-radius: 12px; background: var(--green); color: white; font-size: 21px; }
.layout { display: grid; grid-template-columns: 232px 1fr; min-height: calc(100vh - 72px); }
.sidebar { padding: 27px 18px; background: var(--green-dark); color: white; }
.sidebar small { color: rgba(255,255,255,.45); padding: 0 14px; }
.menu { display: grid; gap: 7px; margin-top: 18px; }
.menu button { text-align: left; border: 0; padding: 13px 14px; color: rgba(255,255,255,.68); background: transparent; border-radius: 12px; }
.menu button.active { background: rgba(213,239,131,.14); color: var(--lime); }
.admin { padding: 34px; background: #f4f6f3; }
.admin-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 26px; }
.admin h1 { font-size: 31px; margin: 0 0 8px; letter-spacing: -.04em; }
.sub { color: var(--muted); margin: 0; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-bottom: 22px; }
.stat { background: white; border-radius: 18px; padding: 20px; border: 1px solid #e5e9e4; }
.stat .label { color: var(--muted); font-size: 13px; }
.stat strong { display: block; font-size: 28px; margin-top: 9px; letter-spacing: -.04em; }
.stat .trend { font-size: 12px; color: var(--green); margin-top: 5px; }
.panel { background: white; border: 1px solid #e5e9e4; border-radius: 20px; padding: 21px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.panel h2 { font-size: 18px; margin: 0; }
table { width: 100%; border-collapse: collapse; }
.series-color { display:inline-block; width:18px; height:18px; margin-right:8px; border:1px solid #cbb8a2; border-radius:5px; vertical-align:middle; }
.price-cell { min-width:110px; color:#6f4f39; background:#f6ede3; border-color:#dec9b5; font-weight:700; }
th, td { text-align: left; border-bottom: 1px solid #edf0ec; padding: 14px 10px; font-size: 13px; }
th { color: var(--muted); font-weight: 600; }
.status { display: inline-block; padding: 6px 9px; border-radius: 99px; background: #edf7e7; color: var(--green); font-size: 11px; }
.status.warn { background: #fff1e8; color: #a94c21; }
.status.danger { background: #fce9e8; color: var(--red); }
.inventory-bar { width: 90px; height: 6px; border-radius: 8px; background: #edf0ec; overflow: hidden; }
.inventory-bar span { display: block; height: 100%; background: var(--green); border-radius: 8px; }
.inventory-bar.low span { background: var(--orange); }
.cart-drawer { position: fixed; inset: 0; background: rgba(13,25,18,.38); z-index: 60; display: flex; justify-content: flex-end; }
.cart { width: min(440px, 100%); background: #fbfaf6; height: 100%; padding: 25px; box-shadow: var(--shadow); overflow-y: auto; }
.cart-head { display: flex; align-items: center; justify-content: space-between; }
.close { border: 0; background: #e8ece7; border-radius: 50%; width: 37px; height: 37px; }
.cart-line { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.mini-visual { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 24px; }
.qty { display: flex; align-items: center; gap: 8px; margin-top: 5px; }
.qty button { border: 1px solid var(--line); background: white; width: 24px; height: 24px; border-radius: 7px; }
.total { display: flex; justify-content: space-between; font-size: 20px; font-weight: 800; margin: 24px 0 16px; }
.checkout-form { display: grid; gap: 11px; }
.checkout-form input { width: 100%; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.checkout-form .primary { width: 100%; }
.empty { color: var(--muted); text-align: center; padding: 60px 10px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--ink); color: white; border-radius: 13px; padding: 12px 18px; z-index: 100; box-shadow: var(--shadow); }

@media (max-width: 980px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .nav button:not(.primary) { display: none; }
  .hero { margin: 15px; padding: 30px 24px; }
  .toolbar { padding: 16px; align-items: stretch; flex-direction: column; }
  .search { min-width: 0; width: 100%; }
  .grid { padding: 4px 15px 40px; grid-template-columns: 1fr 1fr; gap: 10px; }
  .product { padding: 10px; }
  .visual { font-size: 45px; }
  .layout { grid-template-columns: 1fr; }
  .sidebar { padding: 12px; }
  .menu { grid-template-columns: repeat(4, 1fr); margin-top: 7px; }
  .menu button { text-align: center; font-size: 12px; padding: 9px 5px; }
  .admin { padding: 22px 14px; overflow-x: auto; }
  .stats { grid-template-columns: 1fr 1fr; }
  .panel { min-width: 680px; }
}

/* 图库选品系统 */
.topbar.dark { background:#3a2a22; color:#fff; border:0; }
.topbar.dark .nav button { color:#d8dde4; }
.topbar.dark .nav button.active { background:#69503e; color:#fff; }
.brand-mark.light { background:#f3e7d8; color:#624331; }
.lang { border:1px solid #56616b!important; }
.login-page { min-height:100vh; display:grid; place-items:center; background:radial-gradient(circle at 70% 20%,#dbc4a9,transparent 28%),#3a2921; padding:24px; }
.login-card { width:min(480px,100%); background:#fff; border-radius:28px; padding:38px; box-shadow:var(--shadow); }
.brand.large { font-size:23px; margin-bottom:30px; }
.login-art { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; }
.login-art span { background:#eee1d2; color:#684b37; display:grid; place-items:center; height:78px; border-radius:15px; font-size:22px; font-weight:800; }
.login-card h1 { margin:28px 0 8px; font-size:34px; }
.login-card p,.login-card small { color:var(--muted); }
.login-card form { display:grid; gap:12px; margin:23px 0; }
.login-card input,.filters input,.filters select,.bulk-panel input,.bulk-panel select { border:1px solid #d1dbe5; border-radius:11px; padding:13px 15px; background:#fff; }
.gallery-page { padding:25px 16px 70px; background:#f4ede3; min-height:calc(100vh - 72px); }
.quick-actions { display:flex; gap:12px; margin-bottom:14px; }
.quick-actions button,.filters button,.bulk-panel button,.admin-head button,.panel button { padding:11px 18px; border:1px solid #ccd8e4; background:#fff; border-radius:10px; font-weight:700; }
.quick-actions .teal { background:#795b45; color:#fff; border-color:#795b45; }
.updates { padding:15px 18px; border:1px solid #dac5aa; background:#fbf3e9; border-radius:12px; display:grid; gap:7px; max-height:210px; overflow:auto; }
.updates strong { color:#674834; }
.update-title { display:flex; justify-content:space-between; color:#9a7b62; }
.updates button { text-align:left; background:#fff; border:1px solid #dfcdb6; border-radius:10px; padding:8px 14px; color:#83572f; font-size:17px; font-weight:700; }
.library { margin-top:20px; background:#fffdfa; border-radius:12px; border-top:3px solid #795b45; padding:24px 27px; }
.library-tabs,.series-tabs { display:flex; gap:14px; }
.library-tabs { padding-bottom:16px; border-bottom:1px solid #e5ecef; }
.series-tabs { padding:16px 0; }
.library-tabs button,.series-tabs button { min-width:150px; display:grid; gap:8px; border:1px solid #d1dce7; background:#fff; border-radius:12px; padding:13px 20px; color:#0b5c5f; }
.library-tabs button.active,.series-tabs button.active { background:#795b45; color:#fff; border-color:#795b45; box-shadow:0 12px 28px rgba(91,63,43,.18); }
.library-tabs b { font-size:22px; }.series-tabs b { font-size:22px; }
.library-tabs small,.series-tabs small { color:#6d788d; }.library-tabs .active small,.series-tabs .active small { color:#e9ffff; }
.filters { display:grid; grid-template-columns:1.5fr 1.25fr .9fr .9fr; gap:12px; align-items:center; padding:18px 0 24px; }
.filters label { display:flex; align-items:center; gap:8px; font-weight:700; color:#647085; }
.filters label input[type=number] { width:100px; }
.filters .check { justify-content:center; }
.image-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:16px; }
.image-card { border:1px solid #ddcbb7; border-radius:13px; padding:12px; background:#fffdfa; }
.print-sheet { aspect-ratio:1.05; border-radius:10px; padding:15px; display:grid; place-items:center; }
.print-sheet>div { width:100%; height:70%; display:grid; grid-template-columns:repeat(4,1fr); gap:4px; background:#fffdfa; padding:8px; }
.print-sheet span { display:grid; place-items:center; font-size:23px; color:#664936; }
.print-sheet>img { width:100%; height:100%; object-fit:contain; border-radius:7px; background:#fff; }
.code-line { display:flex; align-items:center; gap:6px; margin-top:10px; }
.code-line strong { background:#eee1d2; color:#684b37; border-radius:99px; padding:5px 10px; font-size:17px; }
.code-line button { border:1px solid #d5dfeb; background:#fff; border-radius:99px; padding:5px 9px; color:#6d788d; }
.product-info,.stock-line { display:flex; justify-content:space-between; margin-top:9px; font-size:13px; }
.product-info span:last-child { font-weight:800; color:#79512f; }
.stock-line { align-items:center; }.stock-line .low { color:#d15e3f; font-weight:700; }
.stock-line button { border:0; background:#795b45; color:#fff; padding:7px 9px; border-radius:8px; }
.stock-line button:disabled { background:#aeb8bd; }
.card-note { width:100%; margin-top:10px; padding:10px 11px; border:1px solid #ddcbb7; border-radius:9px; background:#fffdfa; color:#4b3528; }
.card-note:focus { outline:2px solid #d5baa0; border-color:#9a7658; }
.cart-note { margin-top:5px; color:#826851; font-size:11px; max-width:210px; overflow-wrap:anywhere; }
.simple-page { padding:45px 5vw; min-height:calc(100vh - 72px); }
.page-title-row { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; }
.page-title-row h1 { margin-top:0; }
.export-btn { border-color:#b99776!important; color:#674834; }
.order-list { background:#fff; border-radius:16px; margin-top:25px; }
.order-list>div { display:grid; grid-template-columns:2fr 1fr 1fr 1fr; padding:16px; border-bottom:1px solid var(--line); }
.client-price { background:#eaf5f3; color:#0b6d6e; padding:12px; border-radius:10px; margin:15px 0; }
.full { width:100%; }
.admin-shell { display:grid; grid-template-columns:240px 1fr; min-height:100vh; }
.admin-side { background:#3a2a22; color:#fff; padding:25px 18px; display:flex; flex-direction:column; }
.admin-side .menu { margin-top:35px; }
.admin-side .menu button { color:#bdc8d2; }
.admin-side .menu button.active { background:#674c3b; color:#f0d1a8; }
.back-shop { margin-top:auto; padding:12px; background:transparent; color:#fff; border:1px solid #41505d; border-radius:10px; }
.bulk-panel { display:flex; gap:10px; flex-wrap:wrap; align-items:center; background:#e8f4f2; border:1px solid #c4e0dc; padding:16px; border-radius:14px; margin-bottom:18px; }
.image-dropzone { display:flex; align-items:center; justify-content:center; gap:20px; min-height:170px; margin-bottom:18px; padding:24px; border:2px dashed #b99a7b; border-radius:18px; background:#fbf6ef; color:#684a36; cursor:pointer; transition:.2s ease; text-align:left; }
.image-dropzone:hover,.image-dropzone.dragging { border-color:#79553d; background:#f3e6d8; transform:translateY(-1px); }
.image-dropzone.busy { cursor:progress; opacity:.8; }
.drop-icon { width:64px; height:64px; display:grid; place-items:center; flex:0 0 auto; border-radius:18px; background:#856247; color:white; font-size:38px; font-weight:800; }
.image-dropzone h2 { margin:0 0 6px; font-size:21px; }
.image-dropzone p,.image-dropzone small { display:block; margin:3px 0; color:#806b5e; }
.upload-status { display:block; margin-top:12px; color:#6b4630; }
.hint { margin-top:18px; }
code { background:#eef2f5; border-radius:6px; padding:5px 8px; }
.style-tag { display:block; width:max-content; margin-top:4px; padding:3px 7px; border-radius:99px; background:#f1e5d6; color:#795b45; font-size:10px; white-space:nowrap; }
@media(max-width:1100px){.image-grid{grid-template-columns:repeat(3,1fr)}.filters{grid-template-columns:1fr 1fr}.customer-nav{overflow:auto}}
@media(max-width:720px){.image-grid{grid-template-columns:1fr 1fr}.library{padding:15px 10px}.library-tabs button,.series-tabs button{min-width:110px}.library-tabs,.series-tabs{overflow:auto}.filters{grid-template-columns:1fr}.admin-shell{grid-template-columns:1fr}.admin-side{position:static}.customer-nav button{display:block!important;font-size:12px;padding:8px}.topbar.dark{padding:0 10px}.topbar.dark .brand span:last-child{display:none}}
