:root {
  --bg: #f6f3ed;
  --paper: #fffdfa;
  --paper-soft: #fbf8f2;
  --ink: #35332f;
  --muted: #8e8981;
  --faint: #aaa298;
  --line: #e9e2d8;
  --rose: #b97976;
  --rose-deep: #9f605f;
  --rose-soft: #f4e8e4;
  --sage: #748c79;
  --sage-soft: #eaf0e9;
  --gold: #ad8a54;
  --gold-soft: #f3ecdf;
  --plum: #8c7688;
  --danger: #b8645d;
  --danger-soft: #f8e9e5;
  --shadow: 0 12px 34px rgba(72, 58, 43, .045);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }
a { color: inherit; }
svg { display: block; }
img { max-width: 100%; }
[hidden] { display: none !important; }

.boot-screen {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 1px;
}
.brand-seal {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  color: var(--rose-deep);
  background: var(--rose-soft);
  border-radius: 18px 18px 18px 6px;
  font-family: "Songti SC", serif;
  font-size: 24px;
}

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: 238px;
  display: flex;
  flex-direction: column;
  padding: 30px 20px 22px;
  background: rgba(253, 251, 247, .96);
  border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 28px; }
.brand-mark {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--rose-deep);
  background: var(--rose-soft);
  border-radius: 14px 14px 14px 5px;
  font-family: "Songti SC", serif;
  font-size: 21px;
}
.brand-name { margin: 0; font-family: "Songti SC", serif; font-size: 24px; font-weight: 600; letter-spacing: 5px; }
.brand-en { margin-top: 6px; color: var(--faint); font-family: Georgia, serif; font-size: 8px; letter-spacing: 1.8px; }
.store-pill {
  margin: 0 3px 26px;
  padding: 12px 13px;
  background: #f5f1e9;
  border: 1px solid #eee7dc;
  border-radius: 12px;
}
.store-name { overflow: hidden; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.store-sub { margin-top: 4px; color: var(--muted); font-size: 10px; }
.nav-label { margin: 0 13px 10px; color: var(--faint); font-size: 10px; letter-spacing: 2px; }
.nav-list { display: grid; gap: 5px; }
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 44px;
  padding: 0 14px;
  color: #79746c;
  background: transparent;
  border: 0;
  border-radius: 11px;
  text-align: left;
  font-size: 12px;
  letter-spacing: .4px;
  transition: background .2s, color .2s;
}
.nav-item:hover { background: #f6f1eb; color: var(--ink); }
.nav-item.active { color: var(--rose-deep); background: var(--rose-soft); font-weight: 600; }
.nav-item.active::after { content: ""; position: absolute; right: 13px; width: 5px; height: 5px; background: var(--rose); border-radius: 50%; }
.nav-icon { width: 18px; height: 18px; flex: 0 0 auto; }
.sidebar-bottom { margin-top: auto; padding-top: 20px; }
.sidebar-quote { margin: 0 12px 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.sidebar-quote p { margin: 0; color: #9a9288; font-family: "Songti SC", serif; font-size: 11px; line-height: 1.9; letter-spacing: 1px; }
.profile { display: flex; align-items: center; gap: 10px; padding: 10px; }
.avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #846f62;
  background: #eee5da;
  border-radius: 50%;
  font-family: "Songti SC", serif;
  font-size: 13px;
}
.profile-name { max-width: 112px; overflow: hidden; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.profile-role { margin-top: 3px; color: var(--muted); font-size: 9px; }
.profile-action { margin-left: auto; padding: 5px; color: var(--faint); background: none; border: 0; }

.main { min-height: 100vh; margin-left: 238px; padding: 0 38px 32px; }
.topbar {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid rgba(224, 216, 205, .75);
}
.breadcrumb { color: var(--faint); font-size: 11px; }
.breadcrumb strong { margin-left: 8px; color: #716b64; font-weight: 500; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.sync-status { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; }
.sync-status::before { content: ""; width: 6px; height: 6px; background: var(--sage); border-radius: 50%; }
.preview-badge { padding: 6px 10px; color: #96866f; background: #f0eadf; border-radius: 20px; font-size: 10px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 30px 0 25px; }
.eyebrow { margin-bottom: 9px; color: #b09e8b; font-family: Georgia, serif; font-size: 9px; letter-spacing: 2px; }
h1 { margin: 0; font-family: "Songti SC", "STSong", serif; font-size: 28px; font-weight: 500; letter-spacing: 1px; }
.page-description { margin: 9px 0 0; color: var(--muted); font-size: 11px; line-height: 1.8; }
.page-actions { display: flex; flex-wrap: wrap; gap: 9px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 9px 15px;
  color: #69635c;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 11px;
  line-height: 1.3;
  text-decoration: none;
  transition: transform .18s, background .18s;
}
.btn:hover { transform: translateY(-1px); background: #fff; }
.btn-primary { color: #fff; background: var(--rose); border-color: var(--rose); }
.btn-primary:hover { background: var(--rose-deep); }
.btn-sage { color: #fff; background: var(--sage); border-color: var(--sage); }
.btn-gold { color: #fff; background: var(--gold); border-color: var(--gold); }
.btn-quiet { background: transparent; border-color: transparent; }
.btn-small { min-height: 31px; padding: 7px 10px; font-size: 10px; border-radius: 8px; }
.btn-block { width: 100%; }
.icon-btn { width: 36px; height: 36px; padding: 0; }

.notice {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
  padding: 13px 15px;
  color: #8c755e;
  background: #f4eee4;
  border: 1px solid #e9decd;
  border-radius: 12px;
  font-size: 11px;
  line-height: 1.7;
}
.notice strong { color: #6f5a43; font-weight: 600; }
.notice-danger { color: #9d5c55; background: var(--danger-soft); border-color: #efd4cc; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metric-card { min-width: 0; padding: 19px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #79736b; font-size: 11px; }
.metric-dot { width: 8px; height: 8px; background: var(--rose); border-radius: 50%; }
.metric-dot.sage { background: var(--sage); }
.metric-dot.gold { background: var(--gold); }
.metric-dot.plum { background: var(--plum); }
.metric-value { margin-top: 15px; font-family: "DIN Alternate", "Avenir Next", sans-serif; font-size: 29px; line-height: 1; letter-spacing: -.5px; }
.metric-value small { margin-right: 4px; color: #777169; font-family: Georgia, serif; font-size: 15px; }
.metric-foot { margin-top: 13px; padding-top: 11px; color: var(--faint); border-top: 1px solid #f0ebe4; font-size: 9px; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(270px, .85fr); gap: 16px; margin-top: 18px; }
.content-grid.equal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.panel { min-width: 0; padding: 20px; background: rgba(255, 253, 249, .88); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.panel + .panel { margin-top: 16px; }
.content-grid .panel + .panel { margin-top: 0; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.panel-title { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .4px; }
.panel-subtitle { margin-top: 5px; color: var(--faint); font-size: 10px; line-height: 1.6; }
.panel-link { padding: 0; color: var(--rose-deep); background: none; border: 0; font-size: 10px; }

.section-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 24px 0 14px; }
.section-row h2 { margin: 0; font-size: 14px; font-weight: 600; }
.section-note { color: var(--faint); font-size: 10px; }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-bottom: 16px; }
.search-input { width: min(260px, 100%); }
.filter-chip { padding: 7px 11px; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 18px; font-size: 10px; }
.filter-chip.active { color: var(--rose-deep); background: var(--rose-soft); border-color: #e8cfc9; }

.fruit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.fruit-card { min-width: 0; overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.fruit-photo { position: relative; width: 100%; height: 190px; padding: 0; overflow: hidden; background: #f0ece5; border: 0; }
.fruit-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.fruit-card:hover .fruit-photo img { transform: scale(1.025); }
.photo-placeholder { height: 100%; display: grid; place-content: center; justify-items: center; gap: 8px; color: #aaa094; font-size: 10px; }
.photo-placeholder svg { width: 28px; height: 28px; }
.fruit-tag { position: absolute; left: 13px; top: 13px; padding: 5px 8px; color: #696159; background: rgba(255, 253, 249, .9); border-radius: 15px; font-size: 9px; }
.expiry-badge { position: absolute; right: 13px; bottom: 12px; padding: 5px 8px; color: #766a5c; background: rgba(255, 253, 249, .92); border-radius: 8px; font-size: 9px; }
.expiry-badge.urgent { color: #a64f48; background: #fff0ec; }
.fruit-body { padding: 17px; }
.fruit-name { margin: 0; font-family: "Songti SC", serif; font-size: 18px; font-weight: 600; }
.fruit-spec { margin-top: 5px; color: var(--faint); font-size: 9px; }
.stock-box { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 15px; padding: 13px 14px; background: #f8f5ef; border-radius: 11px; }
.stock-label { color: var(--muted); font-size: 9px; }
.stock-number { margin-top: 6px; font-family: "DIN Alternate", sans-serif; font-size: 26px; line-height: 1; }
.stock-number small { margin-left: 4px; color: var(--muted); font-family: "PingFang SC", sans-serif; font-size: 10px; }
.batch-count { color: var(--faint); font-size: 9px; }
.card-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 13px; }
.action-btn { min-height: 37px; padding: 8px 5px; color: white; border: 0; border-radius: 9px; font-size: 11px; }
.action-btn.in { background: var(--sage); }
.action-btn.sell { background: #c37d70; }
.action-btn.waste { background: var(--gold); }

.empty-state { padding: 44px 22px; text-align: center; background: rgba(255, 253, 249, .66); border: 1px dashed #ddd3c5; border-radius: 16px; }
.empty-icon { width: 48px; height: 48px; display: grid; place-items: center; margin: 0 auto 14px; color: #b69a87; background: var(--rose-soft); border-radius: 15px; }
.empty-icon svg { width: 24px; height: 24px; }
.empty-state h3 { margin: 0; font-family: "Songti SC", serif; font-size: 17px; font-weight: 500; }
.empty-state p { max-width: 420px; margin: 9px auto 18px; color: var(--muted); font-size: 11px; line-height: 1.8; }

.data-list { display: grid; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid #f0ebe4; }
.list-row:last-child { border-bottom: 0; }
.list-main { min-width: 0; flex: 1; }
.list-title { font-size: 11px; font-weight: 500; }
.list-sub { margin-top: 4px; color: var(--faint); font-size: 9px; line-height: 1.6; }
.list-value { text-align: right; font-size: 12px; white-space: nowrap; }
.list-value small { display: block; margin-top: 4px; color: var(--faint); font-size: 9px; }
.list-avatar { width: 35px; height: 35px; display: grid; place-items: center; flex: 0 0 auto; color: #976a62; background: var(--rose-soft); border-radius: 12px; font-family: "Songti SC", serif; }

.supplier-grid, .customer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.supplier-card, .customer-card { min-width: 0; padding: 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow); }
.supplier-name, .customer-name { margin: 0; font-family: "Songti SC", serif; font-size: 17px; font-weight: 600; }
.tag-list { display: flex; flex-wrap: wrap; gap: 5px; margin: 11px 0; }
.tag { display: inline-flex; padding: 4px 7px; color: #81766b; background: #f3eee7; border-radius: 6px; font-size: 9px; }
.tag.rose { color: var(--rose-deep); background: var(--rose-soft); }
.tag.sage { color: #5f7664; background: var(--sage-soft); }
.tag.gold { color: #90703e; background: var(--gold-soft); }
.card-note { color: var(--muted); font-size: 10px; line-height: 1.7; }
.card-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 13px 0; }
.card-metric { padding: 10px; background: #f8f5ef; border-radius: 9px; }
.card-metric span { display: block; color: var(--faint); font-size: 9px; }
.card-metric strong { display: block; margin-top: 5px; font-size: 14px; font-weight: 500; }
.prediction { margin: 13px 0; padding: 12px; background: #faf0ec; border-radius: 10px; }
.prediction-label { color: #a5756c; font-size: 9px; }
.prediction-value { margin-top: 6px; font-size: 12px; font-weight: 500; line-height: 1.6; }
.prediction-reason { margin-top: 5px; color: #9a817a; font-size: 9px; line-height: 1.6; }
.card-footer { display: flex; gap: 8px; margin-top: 13px; }
.card-footer .btn { flex: 1; }

.finance-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.formula-box { margin-top: 18px; padding: 16px 18px; color: #806e5b; background: #f4eee5; border-radius: 12px; font-size: 11px; line-height: 1.9; }

.market-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.market-card { padding: 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 13px; }
.market-name { font-family: "Songti SC", serif; font-size: 16px; }
.market-price { margin: 13px 0 8px; color: var(--rose-deep); font-size: 23px; }
.market-price small { color: var(--muted); font-size: 10px; }
.market-meta { color: var(--faint); font-size: 9px; line-height: 1.8; }
.source-link { display: inline-flex; margin-top: 10px; color: var(--rose-deep); font-size: 10px; text-decoration: none; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(53, 45, 38, .34); }
.modal {
  width: min(620px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(48, 37, 29, .18);
}
.modal-wide { width: min(780px, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 24px 16px; border-bottom: 1px solid var(--line); }
.modal-title { margin: 0; font-family: "Songti SC", serif; font-size: 20px; font-weight: 500; }
.modal-subtitle { margin-top: 6px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.modal-close { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 auto; color: var(--muted); background: #f5f1ea; border: 0; border-radius: 50%; }
.modal-body { padding: 20px 24px 24px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-group { min-width: 0; }
.form-group.full { grid-column: 1 / -1; }
.form-label { display: block; margin-bottom: 7px; color: #716a62; font-size: 10px; }
.required { color: var(--rose); }
input, select, textarea {
  width: 100%;
  min-height: 40px;
  padding: 10px 11px;
  color: var(--ink);
  background: #fcfaf6;
  border: 1px solid #e4dcd1;
  border-radius: 9px;
  outline: none;
  font-size: 11px;
  transition: border .2s, background .2s;
}
input:focus, select:focus, textarea:focus { background: #fff; border-color: #c7a79b; }
textarea { min-height: 76px; resize: vertical; }
input[type="date"] { color-scheme: light; }
.form-hint { margin-top: 6px; color: var(--faint); font-size: 9px; line-height: 1.6; }
.form-error { margin-top: 6px; color: var(--danger); font-size: 10px; }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; padding-top: 17px; border-top: 1px solid var(--line); }
.photo-upload { position: relative; display: grid; place-items: center; min-height: 150px; overflow: hidden; background: #f7f3ec; border: 1px dashed #d8cabc; border-radius: 12px; }
.photo-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-upload-content { display: grid; justify-items: center; gap: 8px; padding: 20px; color: var(--muted); font-size: 10px; text-align: center; }
.photo-preview { width: 100%; height: 210px; object-fit: cover; }
.login-box { text-align: center; }
.login-box .brand-seal { margin: 0 auto 16px; }
.login-box h2 { margin: 0; font-family: "Songti SC", serif; font-size: 24px; font-weight: 500; }
.login-box p { margin: 10px 0 20px; color: var(--muted); font-size: 11px; line-height: 1.8; }

.batch-list { display: grid; gap: 10px; }
.batch-card { padding: 14px; background: #f8f5ef; border: 1px solid #eee7dd; border-radius: 11px; }
.batch-head { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; font-weight: 500; }
.batch-details { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.batch-detail span { display: block; color: var(--faint); font-size: 9px; }
.batch-detail strong { display: block; margin-top: 4px; font-size: 11px; font-weight: 500; }
.code-box { display: flex; align-items: center; gap: 10px; padding: 14px; background: #f5eee7; border-radius: 10px; }
.code-box code { flex: 1; overflow: auto; color: #8e665a; font-family: monospace; font-size: 11px; white-space: nowrap; }
.relation-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; line-height: 1.8; }
.relation-node { padding: 6px 9px; color: #786b60; background: #f4eee6; border-radius: 7px; }

.market-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.market-kpis > div { padding: 16px 17px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; }
.market-kpis span, .market-kpis small { display: block; color: var(--muted); font-size: 9px; }
.market-kpis strong { display: block; margin: 8px 0 5px; color: var(--rose-deep); font-family: "DIN Alternate", sans-serif; font-size: 25px; font-weight: 500; }
.recommendation-panel { margin-top: 18px; }
.recommendation-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; }
.recommendation-card { padding: 15px; background: #faf6f0; border: 1px solid #eee5da; border-radius: 12px; }
.recommendation-card h3 { margin: 11px 0 7px; font-family: "Songti SC", serif; font-size: 15px; font-weight: 600; }
.recommendation-card p { min-height: 47px; margin: 0 0 12px; color: var(--muted); font-size: 9px; line-height: 1.75; }
.watch-list { display: grid; gap: 10px; }
.watch-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.watch-item { padding: 13px; background: #faf7f1; border: 1px solid #eee6db; border-radius: 11px; }
.watch-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.watch-top .tag-list, .watch-top .tag { margin: 0; }
.watch-date { color: var(--faint); font-size: 8px; }
.watch-item h3 { margin: 10px 0 6px; font-family: "Songti SC", serif; font-size: 15px; font-weight: 600; }
.watch-item h3 small { margin-left: 7px; color: var(--rose-deep); font-family: "PingFang SC", sans-serif; font-size: 10px; font-weight: 500; }
.watch-item p { margin: 8px 0; color: var(--muted); font-size: 9px; line-height: 1.7; }
.watch-meta, .watch-source { color: var(--faint); font-size: 9px; line-height: 1.65; }
.watch-source { margin-top: 7px; }
.watch-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 8px; padding-top: 8px; border-top: 1px solid #eee7dd; }
.store-sales { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.store-sales h3 { margin: 0 0 10px; font-size: 11px; font-weight: 600; }
.store-sales > p { color: var(--faint); font-size: 9px; }
.sales-rank { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.sales-rank > span { width: 22px; height: 22px; display: grid; place-items: center; flex: 0 0 auto; color: var(--rose-deep); background: var(--rose-soft); border-radius: 7px; font-size: 9px; }
.sales-rank > div { min-width: 0; flex: 1; }
.sales-rank strong, .sales-rank small { display: block; font-size: 10px; }
.sales-rank small { margin-top: 3px; color: var(--faint); font-size: 8px; }
.sales-rank b { font-size: 10px; font-weight: 500; }
.market-quotes-panel { margin-top: 18px; }
.market-search { display: flex; gap: 7px; min-width: min(330px, 100%); }
.market-search input { min-height: 33px; padding: 7px 10px; }
.premium-quote-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.premium-quote-card { padding: 16px; background: #fcfaf5; border: 1px solid #e9e0d4; border-radius: 13px; }
.quote-zone { color: #9a7d50; font-size: 8px; letter-spacing: .5px; }
.premium-quote-card h3 { margin: 10px 0 6px; font-family: "Songti SC", serif; font-size: 17px; }
.premium-quote-card h3 small { display: block; margin-top: 4px; color: var(--rose-deep); font-family: "PingFang SC", sans-serif; font-size: 10px; font-weight: 500; }
.quote-spec { min-height: 30px; color: var(--faint); font-size: 9px; line-height: 1.65; }
.quote-price { margin: 13px 0; color: var(--rose-deep); font-size: 25px; }
.quote-price small { color: var(--muted); font-size: 9px; }
.quote-supplier { padding-top: 11px; border-top: 1px solid #eee6db; font-size: 11px; font-weight: 500; }
.quote-supplier span { display: block; margin-top: 4px; color: var(--faint); font-size: 8px; font-weight: 400; }
.quote-quality { margin: 9px 0 12px; color: var(--muted); font-size: 9px; }
.public-reference { margin-top: 18px; overflow: hidden; background: rgba(255, 253, 249, .65); border: 1px solid var(--line); border-radius: 14px; }
.public-reference summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; cursor: pointer; font-size: 12px; font-weight: 600; list-style: none; }
.public-reference summary::-webkit-details-marker { display: none; }
.public-reference summary::after { content: "+"; color: var(--rose-deep); font-size: 17px; font-weight: 400; }
.public-reference[open] summary::after { content: "−"; }
.public-reference summary small { margin-left: auto; color: var(--faint); font-size: 9px; font-weight: 400; }
.public-reference-body { padding: 0 18px 18px; }
.reference-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-bottom: 13px; color: var(--faint); font-size: 9px; }
.public-reference .market-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 200; max-width: min(420px, calc(100vw - 32px)); padding: 11px 16px; color: #fff; background: #514a43; border-radius: 10px; box-shadow: 0 10px 30px rgba(45, 36, 29, .2); font-size: 11px; line-height: 1.6; opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: .22s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #9e5e56; }
.loading-line { padding: 30px; color: var(--muted); text-align: center; font-size: 11px; }
.mobile-nav { display: none; }

@media (max-width: 1220px) {
  .sidebar { width: 214px; }
  .main { margin-left: 214px; padding: 0 26px 28px; }
  .fruit-grid, .supplier-grid, .customer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .market-grid, .premium-quote-grid, .watch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recommendation-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .public-reference .market-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .sidebar { width: 184px; padding-left: 12px; padding-right: 12px; }
  .main { margin-left: 184px; padding: 0 18px 24px; }
  .sidebar-quote { display: none; }
  .content-grid, .content-grid.equal { grid-template-columns: 1fr; }
  .fruit-grid, .supplier-grid, .customer-grid { grid-template-columns: 1fr; }
  .page-actions { justify-content: flex-end; }
  .finance-summary { grid-template-columns: 1fr; }
  .brand-name { font-size: 20px; letter-spacing: 2px; }
  .market-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .premium-quote-grid, .watch-grid { grid-template-columns: 1fr; }
  .market-search { min-width: 0; width: 100%; }
  .market-quotes-panel .panel-head { flex-direction: column; }
}
@media (max-width: 640px) {
  .sidebar { position: static; width: 100%; padding: 18px 16px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding: 0 3px 15px; }
  .store-pill, .nav-label, .sidebar-bottom { display: none; }
  .nav-list { display: flex; gap: 5px; overflow-x: auto; padding-bottom: 3px; }
  .nav-item { width: auto; min-width: max-content; height: 36px; padding: 0 11px; font-size: 10px; }
  .nav-item.active::after, .nav-icon { display: none; }
  .main { margin-left: 0; padding: 0 16px 24px; }
  .topbar { height: 56px; }
  .breadcrumb { display: none; }
  .top-actions { width: 100%; justify-content: flex-end; }
  .sync-status { display: none; }
  .page-head { align-items: flex-start; flex-direction: column; padding: 24px 0 20px; }
  h1 { font-size: 25px; }
  .page-actions { justify-content: flex-start; }
  .metrics { grid-template-columns: 1fr 1fr; gap: 10px; }
  .metric-card { padding: 15px; }
  .metric-value { font-size: 24px; }
  .fruit-photo { height: 210px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group.full { grid-column: auto; }
  .modal-backdrop { padding: 10px; }
  .modal { max-height: calc(100vh - 20px); border-radius: 16px; }
  .modal-head, .modal-body { padding-left: 18px; padding-right: 18px; }
  .batch-details { grid-template-columns: repeat(2, 1fr); }
  .market-grid, .public-reference .market-grid { grid-template-columns: 1fr; }
  .recommendation-grid { grid-template-columns: 1fr; }
  .recommendation-card p { min-height: 0; }
  .public-reference summary { align-items: flex-start; flex-wrap: wrap; }
  .public-reference summary small { width: 100%; margin-left: 0; line-height: 1.6; }
  .reference-actions { flex-wrap: wrap; justify-content: flex-start; }
}
