#freshstock {
  --fresh-green: #138a4b;
  --fresh-green-dark: #0f6f3d;
  --fresh-green-soft: #edf7f1;
  --fresh-red: #b83f3f;
  --fresh-red-dark: #922f2f;
  --fresh-red-soft: #fff1f1;
  --fresh-ink: #253129;
  --fresh-muted: #6d7b72;
}

#freshstock .fresh-week-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(280px, 1.6fr) minmax(150px, 1fr);
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 3px 16px rgba(18, 32, 43, .04);
}

#freshstock .fresh-week-center {
  text-align: center;
}

#freshstock .fresh-week-center small {
  display: block;
  margin-bottom: 4px;
  color: #7b887f;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .09em;
}

#freshstock .fresh-week-center h2 {
  margin: 0;
  color: var(--fresh-ink);
  font-size: 19px;
}

#freshstock .fresh-week-state {
  display: block;
  margin-top: 4px;
  color: var(--fresh-green);
  font-size: 10px;
  font-weight: 800;
}

#freshstock .fresh-week-button,
#freshstock .fresh-current-button,
#freshstock .fresh-refresh-button {
  border: 1px solid #d9e3dc;
  border-radius: 9px;
  background: #fff;
  color: #44534a;
  padding: 10px 13px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

#freshstock .fresh-week-button:hover,
#freshstock .fresh-current-button:hover,
#freshstock .fresh-refresh-button:hover {
  border-color: var(--fresh-green);
  background: #f7fbf8;
  color: var(--fresh-green-dark);
}

#freshstock .fresh-week-button:last-of-type {
  text-align: right;
}

#freshstock .fresh-week-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  margin: 0 2px 13px;
}

#freshstock .fresh-current-button,
#freshstock .fresh-refresh-button {
  padding: 7px 10px;
  background: #fff;
  font-size: 10px;
}

#freshstock .fresh-source-note {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 18px;
  margin: 0 4px 14px;
  color: var(--fresh-muted);
  font-size: 10px;
  font-weight: 700;
}

#freshstock .fresh-source-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--fresh-green);
  box-shadow: 0 0 0 4px rgba(19, 138, 75, .09);
}

#freshstock .fresh-source-dot.loading {
  background: #d28b13;
  box-shadow: 0 0 0 4px rgba(210, 139, 19, .1);
}

#freshstock .fresh-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

#freshstock .fresh-stock-card {
  --fresh-accent: var(--fresh-green);
  --fresh-accent-dark: var(--fresh-green-dark);
  --fresh-accent-soft: var(--fresh-green-soft);
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 4px solid var(--fresh-accent);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 18px rgba(18, 32, 43, .05);
}

#freshstock .fresh-stock-card.fresh-beef {
  --fresh-accent: var(--fresh-red);
  --fresh-accent-dark: var(--fresh-red-dark);
  --fresh-accent-soft: var(--fresh-red-soft);
}

#freshstock .fresh-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 19px 14px;
}

#freshstock .fresh-species-title {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

#freshstock .fresh-species-icon {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  flex: 0 0 43px;
  border-radius: 12px;
  background: var(--fresh-accent-soft);
  font-size: 23px;
}

#freshstock .fresh-species-kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--fresh-accent);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .09em;
}

#freshstock .fresh-species-title h2 {
  margin: 0;
  color: var(--fresh-ink);
  font-size: 18px;
  line-height: 1.2;
}

#freshstock .fresh-product-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 7px;
}

#freshstock .fresh-product-chip {
  display: inline-flex;
  border-radius: 999px;
  background: #f1f4f2;
  color: #5e6c64;
  padding: 4px 7px;
  font-size: 8px;
  font-weight: 900;
}

#freshstock .fresh-independent {
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--fresh-accent-soft);
  color: var(--fresh-accent-dark);
  padding: 6px 8px;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .04em;
}

#freshstock .fresh-remaining {
  margin: 0 19px;
  padding: 19px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--fresh-accent-dark), var(--fresh-accent));
  color: #fff;
  box-shadow: 0 10px 25px rgba(19, 138, 75, .14);
}

#freshstock .fresh-beef .fresh-remaining {
  box-shadow: 0 10px 25px rgba(184, 63, 63, .14);
}

#freshstock .fresh-remaining.is-negative {
  background: linear-gradient(135deg, #902a2a, #d74444);
}

#freshstock .fresh-remaining > span {
  display: block;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  opacity: .86;
}

#freshstock .fresh-remaining > strong {
  display: block;
  margin: 7px 0 5px;
  font-size: 37px;
  line-height: 1.08;
  letter-spacing: -.035em;
}

#freshstock .fresh-remaining > strong small {
  font-size: 16px;
  letter-spacing: 0;
  opacity: .85;
}

#freshstock .fresh-remaining > em {
  font-style: normal;
  font-size: 9px;
  opacity: .78;
}

#freshstock .fresh-calculation-list {
  padding: 14px 19px 5px;
}

#freshstock .fresh-calculation-list > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 2px;
  border-bottom: 1px solid #edf1ee;
}

#freshstock .fresh-calculation-list span {
  color: #5e6c64;
  font-size: 11px;
  font-weight: 700;
}

#freshstock .fresh-calculation-list strong {
  font-size: 12px;
}

#freshstock .fresh-positive { color: var(--fresh-green-dark); }
#freshstock .fresh-negative { color: #bb3434; }

#freshstock .fresh-formula {
  margin: 9px 19px 16px;
  border-radius: 9px;
  background: #f6f8f7;
  color: #526159;
  padding: 9px 10px;
  text-align: center;
  font: 800 10px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
}

#freshstock .fresh-daily-section {
  border-top: 1px solid var(--line);
}

#freshstock .fresh-section-title {
  padding: 14px 19px 10px;
}

#freshstock .fresh-section-title span {
  display: block;
  color: var(--fresh-accent);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .09em;
}

#freshstock .fresh-section-title h3 {
  margin: 3px 0 0;
  font-size: 13px;
}

#freshstock .fresh-table-wrap {
  overflow: auto;
}

#freshstock table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
}

#freshstock th {
  position: static;
  padding: 9px 8px;
  border-top: 1px solid #eef1ef;
  border-bottom: 1px solid var(--line);
  background: #fafcfb;
  color: #69776f;
  text-align: left;
  white-space: nowrap;
  font-size: 8px;
}

#freshstock td {
  padding: 8px;
  border-bottom: 1px solid #edf1ef;
  color: #34443a;
  white-space: nowrap;
}

#freshstock th:first-child,
#freshstock td:first-child { padding-left: 19px; }
#freshstock th:last-child,
#freshstock td:last-child { padding-right: 19px; }
#freshstock .num { text-align: right; }
#freshstock .fresh-day-name { font-weight: 900; color: #26352c; }
#freshstock .fresh-day-date { display: block; margin-top: 2px; color: #8b9690; font-size: 8px; }
#freshstock .fresh-value-plus { color: var(--fresh-green-dark); font-weight: 800; }
#freshstock .fresh-value-minus { color: #be3535; font-weight: 800; }
#freshstock .fresh-closing { color: #26352c; font-weight: 900; }

#freshstock .fresh-detail-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  background: #fbfcfb;
  color: #34443a;
  padding: 13px 19px;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

#freshstock .fresh-detail-toggle:hover {
  background: var(--fresh-accent-soft);
  color: var(--fresh-accent-dark);
}

#freshstock .fresh-detail-toggle i {
  font-style: normal;
  font-size: 16px;
  transition: transform .2s ease;
}

#freshstock .fresh-detail-toggle[aria-expanded="true"] i { transform: rotate(180deg); }

#freshstock .fresh-details-panel {
  border-top: 1px solid var(--line);
  padding: 2px 0 13px;
  background: #fff;
}

#freshstock .fresh-detail-group { padding-top: 13px; }

#freshstock .fresh-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 0 19px 8px;
}

#freshstock .fresh-detail-head h4 {
  margin: 0;
  font-size: 10px;
  letter-spacing: .04em;
}

#freshstock .fresh-detail-head span {
  border-radius: 999px;
  background: #f0f4f1;
  color: #66746c;
  padding: 4px 7px;
  font-size: 8px;
  font-weight: 900;
}

#freshstock .fresh-detail-table th { font-size: 7px; }
#freshstock .fresh-detail-table td { vertical-align: top; font-size: 9px; }
#freshstock .fresh-detail-product { min-width: 145px; white-space: normal; font-weight: 800; }
#freshstock .fresh-detail-code { display: block; margin-top: 2px; color: #8b9690; font-size: 8px; }
#freshstock .fresh-party-cell { min-width: 100px; white-space: normal; }
#freshstock .fresh-production-tag { display: inline-flex; border-radius: 999px; background: #fff1d8; color: #9b6209; padding: 3px 6px; font-size: 7px; font-weight: 900; }
#freshstock .fresh-empty-row td { padding: 18px; color: #8c9791; text-align: center; }

#freshstock .fresh-audit-card {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) minmax(230px, 1fr);
  gap: 18px;
  margin-top: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 3px 16px rgba(18, 32, 43, .04);
}

#freshstock .fresh-audit-kicker {
  display: block;
  color: var(--fresh-green);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .09em;
}

#freshstock .fresh-audit-card h2 { margin: 4px 0 7px; font-size: 16px; }
#freshstock .fresh-audit-card p { margin: 0; color: #718078; font-size: 11px; line-height: 1.55; }

#freshstock .fresh-audit-badges {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-content: start;
}

#freshstock .fresh-audit-badges span {
  border: 1px solid #dce8df;
  border-radius: 9px;
  background: #f5faf7;
  color: #356044;
  padding: 9px;
  font-size: 9px;
  font-weight: 900;
}

#freshstock .fresh-carry-proof {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  color: #64736a;
  font-size: 10px;
  font-weight: 700;
}

#freshstock .fresh-warning {
  margin-top: 10px;
  border: 1px solid #f0d19c;
  border-radius: 9px;
  background: #fff8eb;
  color: #8a5b10;
  padding: 10px 12px;
  font-size: 10px;
  font-weight: 800;
}

@media (max-width: 1220px) {
  #freshstock .fresh-grid { grid-template-columns: 1fr; }
  #freshstock table { font-size: 11px; }
}

@media (max-width: 800px) {
  #freshstock .fresh-week-card { grid-template-columns: 1fr 1fr; padding: 13px; }
  #freshstock .fresh-week-center { grid-column: 1 / -1; grid-row: 1; }
  #freshstock .fresh-week-button { grid-row: 2; }
  #freshstock .fresh-audit-card { grid-template-columns: 1fr; }
  #freshstock .fresh-carry-proof { grid-column: auto; }
}

@media (max-width: 560px) {
  #freshstock .fresh-week-center h2 { font-size: 16px; }
  #freshstock .fresh-week-button { padding: 9px; font-size: 10px; }
  #freshstock .fresh-card-head { padding: 15px; }
  #freshstock .fresh-species-icon { width: 38px; height: 38px; flex-basis: 38px; font-size: 20px; }
  #freshstock .fresh-species-title h2 { font-size: 15px; }
  #freshstock .fresh-independent { display: none; }
  #freshstock .fresh-remaining { margin: 0 14px; padding: 16px; }
  #freshstock .fresh-remaining > strong { font-size: 31px; }
  #freshstock .fresh-calculation-list { padding-right: 14px; padding-left: 14px; }
  #freshstock .fresh-formula { margin-right: 14px; margin-left: 14px; }
  #freshstock .fresh-daily-table { min-width: 620px; }
  #freshstock .fresh-detail-table { min-width: 620px; }
  #freshstock .fresh-audit-badges { grid-template-columns: 1fr; }
}

.fresh-rules { margin: 8px 0 0; padding-left: 18px; color: #4f5d55; font-size: 13px; line-height: 1.6; }
