/* ============================================================
   烘焙店设计系统  /  Warm Cream · Editorial Minimalism
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;1,400;1,500&family=Noto+Sans+SC:wght@300;400;500;700&family=Noto+Serif+SC:wght@400;500;600;700&display=swap');

:root {
  /* 颜色 */
  --bg:           #f6efe2;
  --bg-soft:      #f1e7d3;
  --surface:      #fffaf2;
  --surface-2:    #fbf3e4;
  --ink:          #2a1d10;
  --ink-soft:     #6b5a48;
  --ink-mute:     #9b8b76;
  --line:         #e7dcc7;
  --line-soft:    #efe7d6;
  --accent:       #a8794d;
  --accent-dark:  #6f4d2d;
  --accent-soft:  #d8b88f;
  --tag-low-bg:   #e7dccb;
  --tag-low-fg:   #6f4d2d;
  --tag-none-bg:  #ddead2;
  --tag-none-fg:  #4a6b34;
  --danger:       #b14a3a;
  --success:      #4a8059;

  /* 字体 */
  --font-display: 'Noto Serif SC', 'Cormorant Garamond', 'Songti SC', serif;
  --font-sans:    'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', sans-serif;
  --font-italic:  'Cormorant Garamond', 'Noto Serif SC', serif;

  /* 间距与圆角 */
  --r-sm:  6px;
  --r-md:  10px;
  --r-lg:  16px;
  --r-xl:  22px;

  /* 阴影 */
  --shadow-sm: 0 1px 2px rgba(60, 40, 20, 0.04);
  --shadow-md: 0 6px 20px -8px rgba(60, 40, 20, 0.12), 0 1px 2px rgba(60, 40, 20, 0.04);
  --shadow-lg: 0 16px 40px -12px rgba(60, 40, 20, 0.18), 0 2px 6px rgba(60, 40, 20, 0.06);

  /* 动效 */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ============================================================
   全局重置
   ============================================================ */
*,
*::before,
*::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse at top, rgba(168, 121, 77, 0.05), transparent 60%),
    url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.55 0 0 0 0 0.40 0 0 0 0 0.20 0 0 0 0.06 0'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
  font-feature-settings: "tnum" 0, "kern" 1;
  line-height: 1.6;
  min-height: 100vh;
  padding-bottom: env(safe-area-inset-bottom);
}

img { max-width: 100%; display: block; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

a { color: var(--accent-dark); text-decoration: none; }
a:hover { color: var(--ink); }

input, textarea, select {
  font: inherit;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 11px 14px;
  width: 100%;
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
input:focus, textarea:focus, select:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(168, 121, 77, 0.18);
}
textarea { resize: vertical; min-height: 90px; }

::selection { background: var(--accent-soft); color: var(--ink); }

/* ============================================================
   通用容器
   ============================================================ */
.container { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 18px; }

.muted   { color: var(--ink-soft); }
.tiny    { font-size: 12px; letter-spacing: 0.02em; }
.italic  { font-family: var(--font-italic); font-style: italic; font-weight: 400; }

/* ============================================================
   头部
   ============================================================ */
.site-header {
  padding: 22px 18px 18px;
  text-align: center;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(246, 239, 226, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 30;
}
.site-header .brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 0.06em;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.site-header .brand::before,
.site-header .brand::after {
  content: '';
  display: inline-block;
  width: 26px;
  height: 1px;
  background: var(--ink-mute);
}
.site-header .slogan {
  margin-top: 6px;
  font-family: var(--font-italic);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}
.site-header .date-line {
  margin-top: 4px;
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ============================================================
   渠道 Tab
   ============================================================ */
.channel-tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  margin: 18px auto 14px;
  max-width: 360px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.channel-tab {
  flex: 1;
  padding: 9px 14px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  border-radius: 999px;
  transition: all 200ms var(--ease);
}
.channel-tab.active {
  background: var(--ink);
  color: var(--bg);
  box-shadow: var(--shadow-sm);
}

/* ============================================================
   渠道面板
   ============================================================ */
.channel-panel { padding: 6px 18px 0; }
.channel-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 8px;
}
@media (max-width: 380px) {
  .channel-actions { grid-template-columns: 1fr; }
}

/* ============================================================
   按钮
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: var(--r-md);
  transition: all 220ms var(--ease);
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent-dark); }
.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border-color: var(--line);
}
.btn-ghost:hover { color: var(--ink); border-color: var(--ink-mute); }
.btn-danger {
  background: transparent;
  color: var(--danger);
  border-color: rgba(177, 74, 58, 0.3);
}
.btn-danger:hover { background: rgba(177, 74, 58, 0.06); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn .arrow { display: inline-block; transition: transform 220ms var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* ============================================================
   分类筛选
   ============================================================ */
.filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px 4px;
  margin-top: 8px;
}
.filter-label {
  font-family: var(--font-italic);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-soft);
}
.filter-select {
  flex: 1;
  padding: 9px 36px 9px 14px;
  border-radius: 999px;
  background: var(--surface) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M2 4l4 4 4-4' stroke='%236b5a48' stroke-width='1.4' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat right 14px center;
  border: 1px solid var(--line);
  font-size: 14px;
}

/* ============================================================
   产品列表卡片
   ============================================================ */
.section-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink);
  margin: 26px 18px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::before {
  content: '';
  width: 18px; height: 1px; background: var(--accent);
}
.section-title .count {
  margin-left: auto;
  font-family: var(--font-italic);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-mute);
  font-weight: 400;
  letter-spacing: 0;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  padding: 4px 18px 28px;
}
@media (min-width: 540px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
}
@media (min-width: 760px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}

.product-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-sm);
  transition: all 280ms var(--ease);
  display: block;
  position: relative;
  opacity: 0;
  animation: cardIn 600ms var(--ease) forwards;
}
.product-card:nth-child(2)  { animation-delay: 60ms;  }
.product-card:nth-child(3)  { animation-delay: 120ms; }
.product-card:nth-child(4)  { animation-delay: 180ms; }
.product-card:nth-child(5)  { animation-delay: 240ms; }
.product-card:nth-child(6)  { animation-delay: 300ms; }
.product-card:nth-child(7)  { animation-delay: 360ms; }
.product-card:nth-child(8)  { animation-delay: 420ms; }
.product-card:nth-child(n+9){ animation-delay: 480ms; }

@keyframes cardIn {
  to { opacity: 1; transform: none; }
  from { opacity: 0; transform: translateY(10px); }
}

.product-card:active { transform: scale(0.985); }
@media (hover: hover) {
  .product-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--line);
  }
  .product-card:hover .product-img img { transform: scale(1.04); }
}

.product-img {
  aspect-ratio: 4 / 5;
  background: var(--surface-2);
  overflow: hidden;
  position: relative;
}
.product-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 700ms var(--ease);
}
.product-img.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-mute);
  font-family: var(--font-italic);
  font-style: italic;
  font-size: 14px;
}
.product-img .badge {
  position: absolute;
  top: 10px; left: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.tag {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  letter-spacing: 0.05em;
  padding: 3px 9px;
  border-radius: 999px;
  font-weight: 500;
}
.tag-low  { background: var(--tag-low-bg);  color: var(--tag-low-fg); }
.tag-none { background: var(--tag-none-bg); color: var(--tag-none-fg); }
.tag-soldout {
  background: rgba(42, 29, 16, 0.88);
  color: var(--bg);
}

.product-meta {
  padding: 12px 13px 14px;
}
.product-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.35;
  letter-spacing: 0.02em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}
.product-price {
  margin-top: 8px;
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: var(--accent-dark);
}
.product-price .symbol {
  font-family: var(--font-italic);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-mute);
}
.product-price .num {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* 产品详情页 */
.detail-wrap { padding-bottom: 110px; }
.detail-back {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 40;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 250, 242, 0.9);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.carousel {
  position: relative;
  background: var(--surface-2);
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.carousel-track {
  display: flex;
  height: 100%;
  scroll-snap-type: x mandatory;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  height: 100%;
}
.carousel-slide img {
  width: 100%; height: 100%; object-fit: cover;
}
.carousel-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  padding: 4px 8px;
  background: rgba(42, 29, 16, 0.4);
  border-radius: 999px;
}
.carousel-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255, 250, 242, 0.5);
  transition: all 200ms var(--ease);
}
.carousel-dot.active {
  background: var(--bg);
  width: 18px;
  border-radius: 4px;
}

.detail-info {
  padding: 22px 22px 28px;
}
.detail-name {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.3;
  color: var(--ink);
}
.detail-tags {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.detail-price {
  margin-top: 16px;
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: var(--accent-dark);
}
.detail-price .symbol {
  font-family: var(--font-italic);
  font-style: italic;
  font-size: 16px;
  color: var(--ink-mute);
}
.detail-price .num {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
}
.detail-divider {
  margin: 22px 0;
  border: 0;
  border-top: 1px solid var(--line);
}
.detail-intro {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.85;
  white-space: pre-wrap;
}

.cta-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  background: rgba(246, 239, 226, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  z-index: 30;
}

/* ============================================================
   弹窗
   ============================================================ */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(42, 29, 16, 0.42);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms var(--ease);
}
.modal-mask.show { opacity: 1; pointer-events: auto; }
.modal {
  width: 100%;
  max-width: 560px;
  background: var(--bg);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 22px 22px calc(22px + env(safe-area-inset-bottom));
  max-height: 92vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 320ms var(--ease);
  box-shadow: var(--shadow-lg);
}
.modal-mask.show .modal { transform: none; }
@media (min-width: 640px) {
  .modal-mask { align-items: center; }
  .modal { border-radius: var(--r-xl); }
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.modal-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.modal-close {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-size: 20px;
}
.modal-close:hover { background: var(--surface-2); color: var(--ink); }

/* 表单 */
.field {
  margin-bottom: 14px;
}
.field-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.field-required::after {
  content: ' *';
  color: var(--danger);
}

/* Toast */
.toast-area {
  position: fixed;
  top: 18px; left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--ink);
  color: var(--bg);
  padding: 10px 18px;
  font-size: 14px;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  animation: toastIn 240ms var(--ease);
  letter-spacing: 0.04em;
}
.toast.success { background: var(--success); }
.toast.error   { background: var(--danger); }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: none; }
}

/* 空状态 */
.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--ink-mute);
}
.empty .icon {
  font-family: var(--font-italic);
  font-style: italic;
  font-size: 50px;
  color: var(--accent-soft);
  margin-bottom: 8px;
}
.empty .title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 4px;
}
.empty .desc {
  font-size: 13px;
}

/* 骨架屏 */
.skeleton {
  background: linear-gradient(90deg,
    var(--surface-2) 0%,
    var(--surface) 50%,
    var(--surface-2) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: var(--r-md);
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================================
   后台 Admin
   ============================================================ */
.admin-shell { padding: 18px 18px 60px; max-width: 980px; margin: 0 auto; }
.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(246, 239, 226, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 30;
}
.admin-head .brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.06em;
}
.admin-head .brand .dot { color: var(--accent); }
.admin-tabs {
  display: flex;
  gap: 4px;
  margin: 18px 0 22px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 4px;
  border-radius: 999px;
  overflow-x: auto;
  scrollbar-width: none;
}
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tab {
  flex: 1;
  min-width: max-content;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-align: center;
  color: var(--ink-soft);
  border-radius: 999px;
  white-space: nowrap;
  transition: all 200ms var(--ease);
}
.admin-tab.active {
  background: var(--ink);
  color: var(--bg);
}
.admin-section { display: none; }
.admin-section.active { display: block; animation: fadeIn 220ms var(--ease); }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

/* 登录 */
.login-shell {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-md);
  text-align: center;
}
.login-card h1 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin: 0 0 6px;
}
.login-card .sub {
  font-family: var(--font-italic);
  font-style: italic;
  color: var(--ink-soft);
  margin: 0 0 24px;
  font-size: 13px;
}

/* 卡片网格（管理） */
.admin-card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.admin-card-row {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 14px;
  align-items: center;
}
.admin-card-thumb {
  width: 88px; height: 88px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-mute);
  font-family: var(--font-italic);
  font-style: italic;
  font-size: 12px;
}
.admin-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.admin-card-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
}
.admin-card-meta { font-size: 12.5px; color: var(--ink-soft); margin-top: 4px; }
.admin-card-actions { display: flex; flex-direction: column; gap: 6px; }

@media (max-width: 480px) {
  .admin-card-row { grid-template-columns: 64px 1fr; gap: 10px; }
  .admin-card-thumb { width: 64px; height: 64px; }
  .admin-card-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
}

/* 图片管理上传区 */
.upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.upload-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.upload-tile img { width: 100%; height: 100%; object-fit: cover; }
.upload-tile .del {
  position: absolute;
  top: 4px; right: 4px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(42, 29, 16, 0.78);
  color: var(--bg);
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.upload-tile.pending::after {
  content: '上传中…';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(42, 29, 16, 0.42);
  color: var(--bg);
  font-size: 12px;
}
.upload-tile.add {
  border: 1.5px dashed var(--line);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink-mute);
  font-family: var(--font-italic);
  font-style: italic;
  font-size: 13px;
  transition: all 200ms var(--ease);
}
.upload-tile.add:hover { border-color: var(--accent); color: var(--accent-dark); background: var(--surface-2); }
.upload-tile.add input { display: none; }

/* 数据看板 */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}
.kpi {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  padding: 14px 16px;
}
.kpi .label {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--ink-mute);
  text-transform: uppercase;
}
.kpi .value {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  margin-top: 4px;
  color: var(--ink);
}
.kpi .delta { font-size: 11.5px; color: var(--ink-soft); margin-top: 2px; }

.chart-card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 18px;
  margin-bottom: 14px;
}
.chart-card h3 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin: 0 0 12px;
  color: var(--ink);
}
.chart-area { width: 100%; height: 360px; }
.chart-area.tall { height: 460px; }

.status-pill {
  display: inline-flex;
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}
.status-pending   { background: #f5e2c8; color: #8a5b1d; }
.status-contacted { background: #d8e6da; color: #3a6b48; }
.status-done      { background: #e7e2d6; color: #5a4a36; }

/* 行内排序按钮 */
.sort-btns { display: flex; gap: 4px; }
.sort-btn {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--surface-2);
  font-size: 14px;
  color: var(--ink-soft);
}
.sort-btn:hover { background: var(--accent-soft); color: var(--ink); }

/* 工具栏 */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}
.toolbar .spacer { flex: 1; }

/* footer */
.site-footer {
  padding: 30px 18px 50px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-mute);
  border-top: 1px solid var(--line-soft);
  margin-top: 30px;
  font-family: var(--font-italic);
  font-style: italic;
  letter-spacing: 0.04em;
}

/* 隐藏滚动条但允许滚动 */
.hide-scroll { scrollbar-width: none; }
.hide-scroll::-webkit-scrollbar { display: none; }

/* 工具类 */
.flex      { display: flex; }
.flex-col  { display: flex; flex-direction: column; }
.gap-8     { gap: 8px; }
.gap-12    { gap: 12px; }
.gap-16    { gap: 16px; }
.mt-8      { margin-top: 8px; }
.mt-12     { margin-top: 12px; }
.mt-16     { margin-top: 16px; }
.mt-24     { margin-top: 24px; }
.text-c    { text-align: center; }
.hidden    { display: none !important; }
