:root {
  --green: #204d3e;
  --dark: #183b30;
  --sage: #eaf0e9;
  --gold: #ab8551;
  --ink: #223c32;
  --muted: #7b857d;
  --line: #e6e9e1;
  --bg: #f6f7f2;
  --red: #b34f47;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    14px/1.6 -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    'Microsoft YaHei',
    sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 9px 16px;
  white-space: nowrap;
}
button:hover {
  background: var(--sage);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.primary {
  background: var(--green);
  border-color: var(--green);
  color: white;
}
.primary:hover {
  background: #2b604c;
}
.danger {
  color: var(--red);
}
a {
  color: var(--green);
  text-decoration: none;
}
input,
select,
textarea {
  padding: 10px 12px;
  border: 1px solid #dce2d8;
  background: #fff;
  border-radius: 7px;
  color: var(--ink);
  min-width: 0;
  width: 100%;
  outline: none;
}
input:focus,
select:focus,
textarea:focus {
  border-color: #477d5e;
  box-shadow: 0 0 0 3px #477d5e15;
}
input[type='checkbox'] {
  width: 17px;
  height: 17px;
  accent-color: var(--green);
  vertical-align: middle;
}
textarea {
  min-height: 86px;
  resize: vertical;
}
label {
  display: block;
}
label > span {
  display: block;
  font-size: 12px;
  color: #66776c;
  margin-bottom: 6px;
}
.shell {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 226px;
  background: #fff;
  border-right: 1px solid var(--line);
  position: fixed;
  inset: 0 auto 0 0;
  padding: 28px 16px 16px;
  display: flex;
  flex-direction: column;
  z-index: 10;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0 12px 26px;
}
.brandmark {
  background: var(--dark);
  color: #eee5cf;
  display: grid;
  place-items: center;
  width: 40px;
  height: 44px;
  border-radius: 10px;
  font-size: 25px;
  font-family: serif;
}
.brand-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex: 0 0 44px;
  border-radius: 9px;
  background: #fff;
}
.brand b {
  font-size: 20px;
  letter-spacing: 2px;
  white-space: nowrap;
}
.brand small {
  display: block;
  font-size: 10px;
  color: #8b948c;
  letter-spacing: 1px;
}
.navscroll {
  overflow-y: auto;
  flex: 1;
}
.navgroup {
  font-size: 10px;
  letter-spacing: 2px;
  color: #a0a89e;
  margin: 20px 16px 8px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 7px;
  margin: 3px 0;
  color: #6b786d;
  font-size: 13px;
}
.nav:hover {
  background: #f5f7f0;
}
.nav.active {
  background: var(--sage);
  color: var(--green);
  font-weight: 600;
}
.nav i {
  font-style: normal;
  width: 20px;
  font-size: 17px;
}
.nav-unavailable {
  margin-left: auto;
  color: #a4a99d;
  font-size: 9px;
  font-weight: 400;
  white-space: nowrap;
}
.unavailable-panel {
  text-align: center;
  padding: 60px 24px;
}
.unavailable-icon {
  font-size: 40px;
  color: #9eb292;
  margin-bottom: 12px;
}
.unavailable-panel h2 {
  font-size: 22px;
}
.unavailable-panel p {
  font-size: 13px;
  color: var(--muted);
  margin: 15px auto 24px;
  max-width: 500px;
}
.system-code-input {
  display: flex;
  align-items: center;
  border: 1px solid #dce2d8;
  border-radius: 7px;
  background: #f7f9f3;
  overflow: hidden;
}
.system-code-prefix {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  padding: 10px 12px;
  color: var(--green);
  font-family: ui-monospace, Consolas, monospace;
  font-weight: 600;
}
.system-code-prefix small {
  font-size: 11px;
  font-family: inherit;
  color: var(--muted);
  font-weight: 400;
}
.system-code-input input {
  border: 0;
  border-left: 1px solid #dce2d8;
  border-radius: 0;
  flex: 1;
  min-width: 0;
}
.system-code-input:focus-within {
  border-color: #477d5e;
  box-shadow: 0 0 0 3px #477d5e15;
}
.system-code-input input:focus {
  box-shadow: none;
}
@media (max-width: 760px) {
  .system-code-input {
    flex-wrap: wrap;
  }
  .system-code-prefix {
    width: 100%;
  }
  .system-code-input input {
    width: 100%;
    flex-basis: 100%;
    border-left: 0;
    border-top: 1px solid #dce2d8;
  }
}
.sidebottom {
  border-top: 1px solid var(--line);
  padding: 18px 10px 0;
  color: var(--muted);
  font-size: 11px;
}
.statusdot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #6e9673;
  border-radius: 50%;
  margin-right: 6px;
}
.main {
  margin-left: 226px;
  width: calc(100% - 226px);
}
.topbar {
  height: 82px;
  background: #ffffffc0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 38px;
}
.crumb {
  color: #879185;
  font-size: 12px;
}
.crumb b {
  color: var(--ink);
  font-weight: 500;
}
.account {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 12px;
}
.avatar {
  display: grid;
  place-items: center;
  background: #e8eee3;
  border: 1px solid #dce5d5;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--green);
}
.content {
  max-width: 1660px;
  margin: auto;
  padding: 32px 38px 60px;
}
.pagehead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 27px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--gold);
  margin-bottom: 5px;
}
h1 {
  font-size: 27px;
  margin: 0 0 4px;
  font-weight: 600;
  letter-spacing: 1px;
}
h2 {
  font-size: 16px;
  margin: 0;
  font-weight: 600;
}
h3 {
  font-size: 14px;
}
.sub {
  color: #8b9388;
  font-size: 12px;
  margin: 0;
}
.actions,
.toolbar {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
}
.toolbar {
  margin: 0 0 18px;
}
.toolbar input {
  width: 220px;
}
.toolbar select {
  width: 180px;
}
.toolbar input[type='date'] {
  width: 150px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 25px;
}
.metric {
  padding: 23px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 11px;
}
.metric .label {
  font-size: 12px;
  color: #7f8d7f;
  display: flex;
  justify-content: space-between;
}
.metric .value {
  font-size: 32px;
  line-height: 1.3;
  margin-top: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
}
.metric .note {
  font-size: 10px;
  color: #9ba393;
  margin-top: 8px;
}
.metric.featured {
  background: var(--dark);
  color: white;
  border-color: var(--dark);
}
.metric.featured .label,
.metric.featured .note {
  color: #b8c9b8;
}
.grid2 {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 22px;
  margin-bottom: 22px;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
  margin-bottom: 22px;
}
.panelhead {
  padding: 20px 23px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.panelbody {
  padding: 22px;
}
.chart {
  height: 290px;
}
.tablewrap {
  overflow: auto;
}
.select-all-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 58px;
  padding: 7px 5px;
  cursor: pointer;
  color: var(--green);
  font-weight: 600;
  user-select: none;
}
.select-all-label input { cursor: pointer; }
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  white-space: nowrap;
}
th {
  font-size: 11px;
  color: #8c9788;
  font-weight: 500;
  background: #fafbf7;
  padding: 13px 20px;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 16px 20px;
  border-bottom: 1px solid #f0f2eb;
  font-size: 12px;
}
tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: #fbfcf8;
}
td .secondary {
  display: block;
  color: #98a08f;
  font-size: 10px;
  margin-top: 3px;
}
.rowtitle {
  font-weight: 600;
  color: var(--ink);
}
.code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 11px;
  color: #728475;
}
.tag {
  display: inline-block;
  padding: 3px 9px;
  background: #edf4ec;
  border-radius: 4px;
  color: #477855;
  font-size: 10px;
}
.tag.red {
  background: #fcf0ec;
  color: var(--red);
}
.tag.gold {
  background: #f7f0e3;
  color: #997d46;
}
.link {
  border: 0;
  padding: 3px 7px;
  font-size: 12px;
  background: transparent;
  color: #42785b;
}
.pager {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
  border-top: 1px solid var(--line);
}
.pager button {
  padding: 5px 12px;
  margin-left: 8px;
}
.empty {
  padding: 55px 20px;
  text-align: center;
  color: #a0a98f;
  font-size: 13px;
}
.alert {
  border: 1px solid #e8d6b0;
  background: #fffbef;
  padding: 12px 16px;
  margin-bottom: 20px;
  border-radius: 7px;
  color: #967435;
  font-size: 12px;
}
.quickgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.quickgrid button {
  padding: 20px 8px;
  text-align: center;
  border-color: #e6ebe0;
  background: #fafcf7;
}
.quickgrid strong {
  display: block;
  font-size: 22px;
  margin-bottom: 6px;
  color: #4a7455;
}
.quickgrid span {
  font-size: 11px;
}
.bottle-thumb {
  width: 36px;
  height: 44px;
  border-radius: 5px;
  object-fit: cover;
  margin-right: 12px;
  vertical-align: middle;
  background: #f1f3e9;
}
.productcell {
  display: flex;
  align-items: center;
}
.bottle-icon {
  width: 36px;
  height: 44px;
  border-radius: 5px;
  margin-right: 12px;
  display: grid;
  place-items: center;
  background: #f0f3e8;
  color: #9da88b;
  font-size: 24px;
}
.footerline {
  font-size: 10px;
  color: #a0a897;
  margin-top: 25px;
  text-align: center;
}
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}
.loginart {
  background: var(--dark);
  color: #ede9d9;
  padding: 10vw 6vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.loginart:after {
  content: '酿';
  font-family: serif;
  position: absolute;
  font-size: 400px;
  opacity: 0.045;
  bottom: -150px;
  right: -60px;
}
.loginart .brand {
  padding: 0;
  margin-bottom: 70px;
}
.loginart h1 {
  font-size: 42px;
  line-height: 1.6;
  letter-spacing: 4px;
}
.loginart p {
  color: #9db5a4;
  max-width: 320px;
  line-height: 2;
  font-size: 13px;
}
.loginbox {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
}
.loginform {
  width: 330px;
}
.loginform h1 {
  font-size: 25px;
  margin-bottom: 10px;
}
.loginform label {
  margin-top: 20px;
}
.loginform button {
  width: 100%;
  margin-top: 24px;
  padding: 13px;
}
.loginform .remember {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}
.formgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.formgrid .full {
  grid-column: 1/-1;
}
.formhelp {
  font-size: 11px;
  color: var(--muted);
  margin: 8px 0;
}
.formactions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
dialog {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 0;
  width: 660px;
  max-width: 94vw;
  max-height: 90dvh;
  color: var(--ink);
  box-shadow: 0 24px 80px #162d292a;
}
dialog::backdrop {
  background: #10231d70;
  backdrop-filter: blur(3px);
}
.dialoghead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: white;
  z-index: 1;
}
.dialogbody {
  padding: 24px;
  overflow: auto;
}
.close {
  border: 0;
  font-size: 20px;
  padding: 0 5px;
}
.detailsgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 25px;
}
.detailrow {
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  display: flex;
  gap: 14px;
}
.detailrow span {
  color: var(--muted);
  min-width: 75px;
}
.photos {
  display: flex;
  gap: 12px;
  overflow: auto;
  padding: 12px 0;
}
.photo {
  position: relative;
  flex: 0 0 130px;
}
.photo img {
  width: 130px;
  height: 150px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
}
.photo button {
  font-size: 11px;
  padding: 3px 6px;
}
.photo a {
  display: block;
}
.field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}
.image-dropzone {
  min-height: 126px;
  border: 2px dashed #b8c6bd;
  border-radius: 10px;
  background: #f8faf7;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: .18s ease;
}
.image-dropzone:hover,.image-dropzone.dragging {
  border-color: var(--primary);
  background: #eef5f0;
}
.image-dropzone input { display: none; }
.image-dropzone strong { color: var(--primary); font-size: 15px; }
.image-dropzone small { color: var(--muted); }
.image-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(92px,1fr));
  gap: 10px;
  margin-top: 12px;
}
.image-preview-item { min-width: 0; }
.image-preview-item img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.image-preview-item small { display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.image-preview-item button { margin-top: 5px; padding: 3px 7px; font-size: 11px; }
.trace-identity {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 16px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8faf7;
}
.trace-identity img { width: 112px; height: 112px; background:#fff; border-radius:6px; }
.trace-identity div { display:flex; flex-direction:column; gap:4px; min-width:0; }
.trace-identity span,.trace-identity small { color:var(--muted); font-size:12px; }
.trace-identity b { overflow-wrap:anywhere; font-family:Consolas,'Courier New',monospace; }
.scanbox {
  background: var(--dark);
  min-height: 230px;
  border-radius: 10px;
  color: #ccd8ca;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  margin: 18px 0;
  position: relative;
  overflow: hidden;
}
.scanbox video {
  width: 100%;
  max-height: 350px;
}
.scanbox strong {
  font-size: 45px;
  line-height: 1.4;
}
.scanbox span {
  font-size: 12px;
}
.mobilebar {
  display: none;
}
#toast {
  position: fixed;
  bottom: 35px;
  left: 50%;
  transform: translateX(-50%);
  background: #213f35;
  color: white;
  padding: 12px 22px;
  border-radius: 8px;
  z-index: 100;
  box-shadow: 0 8px 25px #0002;
  max-width: 90vw;
  display: none;
}
#toast.error {
  background: #a44439;
}
.loading {
  text-align: center;
  padding: 100px 20px;
  color: var(--muted);
}
.saleline {
  display: grid;
  grid-template-columns: 2fr 0.7fr 0.8fr auto;
  gap: 8px;
  align-items: end;
  margin: 10px 0;
}
.small {
  font-size: 11px;
  color: var(--muted);
}
.value.red {
  color: var(--red);
}
.searchsplit {
  display: flex;
  gap: 8px;
}
.searchsplit input {
  flex: 1;
}
.signin-note {
  margin-top: 28px;
  font-size: 10px;
  color: #9ca495;
}
.listnote {
  padding: 12px 20px;
  background: #f9faf5;
  color: #8f9a87;
  font-size: 11px;
}
.viewerror {
  padding: 50px;
  text-align: center;
}
.camera-stop {
  margin: 8px;
}
.wide {
  width: 1050px;
}
.scanrank {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 11px;
}
.checklist {
  max-height: 180px;
  overflow: auto;
  border: 1px solid var(--line);
  padding: 10px;
  border-radius: 7px;
}
.checklist label {
  padding: 5px;
  font-size: 12px;
}
.nojs {
  text-align: center;
}
@media (max-width: 1100px) {
  .sidebar {
    width: 195px;
  }
  .main {
    margin-left: 195px;
    width: calc(100% - 195px);
  }
  .content {
    padding: 25px;
  }
  .topbar {
    padding: 0 25px;
  }
  .metrics {
    gap: 10px;
  }
  .metric {
    padding: 18px;
  }
  .metric .value {
    font-size: 26px;
  }
  .grid2 {
    grid-template-columns: 1fr;
  }
  .scanrank {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 760px) {
  .sidebar {
    display: none;
  }
  .main {
    margin-left: 0;
    width: 100%;
  }
  .topbar {
    height: 63px;
    padding: 0 18px;
    padding-top: env(safe-area-inset-top);
  }
  .topbar .crumb {
    font-size: 11px;
  }
  .content {
    padding: 23px 16px 105px;
  }
  .pagehead {
    margin-bottom: 20px;
    align-items: flex-start;
    gap: 10px;
  }
  .pagehead .actions {
    justify-content: flex-end;
  }
  .pagehead .actions button {
    padding: 8px 10px;
    font-size: 11px;
  }
  h1 {
    font-size: 22px;
  }
  .sub {
    font-size: 11px;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .metric {
    padding: 18px;
  }
  .metric .value {
    font-size: 27px;
  }
  .metric .label {
    font-size: 11px;
  }
  .metric .note {
    font-size: 9px;
  }
  .grid2 {
    gap: 0;
  }
  .panelhead {
    padding: 17px;
  }
  .panelbody {
    padding: 16px;
  }
  .toolbar {
    gap: 8px;
  }
  .toolbar input {
    width: 100%;
    flex: 1;
    min-width: 140px;
  }
  .toolbar select {
    width: auto;
    flex: 1;
  }
  .toolbar input[type='date'] {
    width: 125px;
    min-width: 100px;
  }
  .toolbar button {
    padding: 9px 12px;
  }
  .mobilebar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 4px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: #fffffff5;
    z-index: 15;
    justify-content: space-around;
    backdrop-filter: blur(10px);
  }
  .mobilebar a {
    font-size: 10px;
    color: #8b9789;
    text-align: center;
    min-width: 52px;
  }
  .mobilebar i {
    font-style: normal;
    display: block;
    font-size: 20px;
    line-height: 1.4;
  }
  .mobilebar a.active {
    color: var(--green);
    font-weight: bold;
  }
  .formgrid {
    gap: 13px;
    grid-template-columns: 1fr;
  }
  .formgrid .full {
    grid-column: auto;
  }
  .login {
    grid-template-columns: 1fr;
  }
  .loginart {
    display: none;
  }
  .loginbox {
    min-height: 100dvh;
    background: linear-gradient(145deg, #e8efe1, #fafaf5);
    padding-bottom: 80px;
  }
  .loginform {
    background: white;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 28px;
    width: 370px;
    max-width: 100%;
  }
  .loginform .brand {
    display: flex;
    padding-left: 0;
    padding-bottom: 25px;
  }
  .detailsgrid {
    grid-template-columns: 1fr;
  }
  .scanrank {
    grid-template-columns: 1fr;
  }
  .saleline {
    grid-template-columns: 1fr 0.7fr;
  }
  .saleline select {
    grid-column: 1/-1;
  }
  .saleline button {
    grid-column: 2;
  }
  .footerline {
    display: none;
  }
  dialog {
    max-height: 92dvh;
  }
  .dialoghead {
    padding: 16px;
  }
  .dialogbody {
    padding: 17px;
  }
  .account span {
    max-width: 90px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .quickgrid button {
    padding: 15px 5px;
  }
  td,
  th {
    padding: 13px 15px;
  }
  #toast {
    bottom: 100px;
  }
  .content > div.actions {
    margin-bottom: 15px;
  }
}
.category-model {
  padding: 18px 22px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.category-model > span {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 13px;
}
.category-model small {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  background: var(--sage);
  color: var(--green);
  border-radius: 50%;
  font-size: 11px;
}
.category-model i {
  font-style: normal;
  color: #a7b5a5;
}
.category-model p {
  width: 100%;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}
.category-tree-scroll {
  overflow: auto;
}
.category-tree,
.category-tree ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.category-tree {
  padding: 10px 20px 20px;
  min-width: 650px;
}
.category-tree ul {
  margin-left: 22px;
  padding-left: 14px;
  border-left: 1px solid #dfe6da;
}
.category-tree summary {
  padding: 12px 8px;
  cursor: pointer;
  border-bottom: 1px solid #edf0e9;
}
.category-tree summary::marker {
  color: #8fa385;
  font-size: 11px;
}
.category-tree summary:hover {
  background: #fafcf7;
}
.category-tree-name {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
}
.category-folder {
  color: #b49965;
}
.category-tree-name small {
  font-size: 10px;
  background: #eff3eb;
  color: #768a6c;
  padding: 2px 7px;
  border-radius: 3px;
  font-weight: 400;
}
.category-tree-actions {
  display: inline-flex;
  gap: 2px;
  float: right;
  align-items: center;
}
.category-tree-actions button {
  font-size: 11px;
}
.category-placement {
  background: #f4f7f0;
  color: #6f8367;
  padding: 12px;
  margin: 0;
  font-size: 12px;
  border-radius: 7px;
}
.product-category-selectors {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.product-category-selectors select:disabled {
  background: #f7f8f5;
  color: #9ba592;
}
@media (max-width: 760px) {
  .category-model {
    padding: 15px;
    gap: 9px;
  }
  .category-model > span {
    font-size: 12px;
  }
  .product-category-selectors {
    grid-template-columns: 1fr 1fr;
  }
}
.wine-toolbar {
  margin-bottom: 0;
}
.wine-toolbar .actions {
  margin-left: auto;
}
.wine-controls {
  border-bottom: 1px solid var(--line);
}
.category-browser {
  padding: 0;
}
.category-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: #a0ad9b;
  margin-bottom: 18px;
}
.category-breadcrumb button {
  border: 0;
  background: transparent;
  color: var(--green);
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 12px;
  white-space: normal;
  text-align: left;
}
.category-breadcrumb button:hover {
  background: var(--sage);
}
.category-breadcrumb button:last-of-type {
  background: var(--sage);
  font-weight: 600;
}
.category-breadcrumb small {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
}
.category-cards {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.category-card {
  width: 148px;
  padding: 0 0 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.category-card:hover {
  border-color: #a5b89c;
  background: #fafcf7;
  box-shadow: 0 3px 12px #204d3e09;
}
.category-card img {
  width: 100%;
  height: 94px;
  object-fit: contain;
  background: #f7f9f3;
  padding: 8px;
  margin-bottom: 9px;
}
.category-card b {
  padding: 0 10px;
  max-width: 100%;
  font-size: 13px;
  font-weight: 500;
  white-space: normal;
  overflow-wrap: anywhere;
}
.category-card small {
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
}
.category-empty {
  padding: 22px;
  color: var(--muted);
  font-size: 12px;
  background: #fafbf7;
  border: 1px dashed var(--line);
  border-radius: 8px;
}
.wine-directory-summary {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 15px;
  font-size: 12px;
  color: var(--muted);
}
.wine-directory-summary b {
  color: var(--ink);
  font-weight: 600;
}
.wine-directory-summary strong {
  color: var(--green);
  font-size: 14px;
  font-weight: 600;
  margin-left: 7px;
}
.wine-list-table table {
  min-width: 1240px;
}
.wine-list-table th:first-child,
.wine-list-table td:first-child {
  width: 48px;
  text-align: center;
}
.wine-list-table th:last-child {
  min-width: 145px;
}
.wine-cover {
  width: 38px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f4ea;
  border-radius: 5px;
  color: #98a58b;
  font-size: 23px;
}
.wine-cover img {
  width: 38px;
  height: 48px;
  object-fit: contain;
}
.wine-code {
  display: inline-block;
  max-width: 150px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.wine-name {
  display: block;
  min-width: 95px;
  max-width: 160px;
  white-space: normal;
  overflow-wrap: anywhere;
  font-weight: 500;
}
.wine-name .tag {
  margin-top: 6px;
  display: block;
  width: fit-content;
}
.wine-category-path {
  display: block;
  max-width: 160px;
  min-width: 110px;
  white-space: normal;
  line-height: 1.8;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 11px;
}
.wine-average {
  color: var(--green);
}
.wine-profit {
  color: #477855;
}
.stock-warning {
  display: block;
  font-size: 10px;
  color: var(--red);
}
.wine-row-actions {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
  width: 130px;
}
.wine-cost-note {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
  padding: 15px 22px;
  border-top: 1px solid var(--line);
  background: #fafbf7;
}
.bottle-pick-all {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.bottle-picker {
  max-height: 48dvh;
  overflow: auto;
  padding: 4px 0 12px;
}
.bottle-picker section {
  border-bottom: 1px solid var(--line);
  padding: 5px 2px 14px;
}
.bottle-picker h3 {
  margin: 12px 0 8px;
}
.bottle-picker small {
  color: var(--muted);
  font-weight: 400;
  font-size: 11px;
  margin-left: 10px;
}
.bottle-picker label {
  padding: 5px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
@media (max-width: 760px) {
  .wine-toolbar {
    gap: 8px;
  }
  .wine-toolbar input {
    flex: 1;
    min-width: 140px;
  }
  .wine-toolbar .actions {
    width: 100%;
    margin-left: 0;
    margin-top: 4px;
  }
  .wine-toolbar .actions button {
    padding: 9px 10px;
    font-size: 12px;
  }
  .category-breadcrumb {
    gap: 4px;
  }
  .category-breadcrumb small {
    margin-left: 0;
    width: 100%;
    padding: 0 8px;
  }
  .category-cards {
    gap: 10px;
  }
  .category-card {
    width: calc((100% - 20px) / 3);
  }
  .category-card img {
    height: 72px;
    padding: 6px;
  }
  .category-card b {
    font-size: 12px;
    padding: 0 5px;
  }
  .wine-directory-summary {
    gap: 8px 18px;
  }
  .wine-cost-note {
    padding: 12px 16px;
    line-height: 1.8;
  }
  .wine-list-page .pagehead .actions {
    max-width: 145px;
  }
  .wine-list-page .panelhead .small {
    font-size: 10px;
  }
}
@media print {
  .sidebar,
  .topbar,
  .mobilebar,
  .toolbar,
  .actions,
  .pagehead button,
  .pager,
  button,
  .footerline {
    display: none !important;
  }
  .main {
    margin: 0;
    width: 100%;
  }
  .content {
    padding: 0;
  }
  .panel {
    break-inside: avoid;
    border-color: #bbb;
  }
  .tablewrap {
    overflow: visible;
  }
  .metrics {
    grid-template-columns: repeat(4, 1fr);
  }
  body {
    background: white;
  }
  table {
    white-space: normal;
  }
  td,
  th {
    padding: 8px;
  }
}
