:root {
  --ink: #172e25;
  --green: #15583e;
  --dark: #103d2b;
  --mint: #e9f3e9;
  --line: #dfe7df;
  --mute: #5e7065;
  --paper: #f6f8f3;
  --gold: #a67b37;
  color-scheme: light;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 14px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.58;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #62ac83;
  outline-offset: 2px;
}
.layout {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
}
aside {
  height: 100dvh;
  position: sticky;
  top: 0;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  z-index: 3;
}
.brand {
  height: 89px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 21px;
  letter-spacing: -0.5px;
  font-weight: 730;
  font-size: 19px;
}
.brand img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}
.brand small,
.sidebar-foot small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--mute);
  margin-top: 3px;
}
nav {
  flex: 1;
  overflow: auto;
  padding: 0 12px 16px;
}
.nav-label,
.page-title > div > small,
.hero-kicker {
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-weight: 750;
}
.nav-label {
  color: #627469;
  margin: 20px 13px 7px;
}
.nav-label:first-child {
  margin-top: 12px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 13px;
  text-decoration: none;
  color: #485c50;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 550;
  margin: 2px 0;
}
.nav-item.selected {
  color: #165538;
  background: #e7f1e4;
  font-weight: 700;
}
.nav-item:hover {
  background: #eff4ed;
}
.sidebar-foot {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}
.sidebar-foot button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  color: var(--ink);
  font-weight: 640;
}
.sidebar-foot button > svg {
  margin-left: auto;
}
.avatar {
  background: #dcecdf;
  color: #1a613d;
  display: grid;
  place-items: center;
  border-radius: 50%;
  width: 37px;
  height: 37px;
}
main {
  min-width: 0;
}
.topbar {
  height: 64px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 0 clamp(16px, 3vw, 46px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar > div,
.date,
.hero-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar > div:first-child {
  color: #69796f;
  font-size: 12px;
}
.topbar b {
  font-weight: 600;
  color: var(--ink);
}
.demo-ind {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #416747;
  padding: 5px 10px;
  border-radius: 20px;
  background: #f1f6ee;
  font-size: 11px;
  font-weight: 650;
}
.demo-ind i,
.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 100%;
  background: #419160;
}
.content {
  max-width: 1550px;
  margin: auto;
  padding: 27px clamp(16px, 3vw, 46px) 48px;
}
.page-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 12px;
}
.page-title > div > small {
  color: #577864;
  font-size: 10px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(26px, 2.7vw, 39px);
  line-height: 1.14;
  letter-spacing: -1.5px;
  margin: 5px 0 0;
  font-weight: 700;
}
h2 {
  font-size: 18px;
  font-weight: 670;
  letter-spacing: -0.45px;
}
h3 {
  font-size: 14px;
}
.date {
  color: var(--mute);
  font-size: 12px;
  white-space: nowrap;
}
.hero {
  isolation: isolate;
  position: relative;
  background: #0e3c29 url('/carniceria.webp') 80% 54% / cover no-repeat;
  color: #fff;
  overflow: hidden;
  border-radius: 16px;
  padding: 24px 30px;
  min-height: 180px;
  display: flex;
  align-items: center;
  margin-bottom: 18px;
}
.hero:before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    90deg,
    #0e3829 0%,
    #103c2beb 28%,
    #103c2b9e 47%,
    transparent 72%
  );
}
.hero h2 {
  font-size: clamp(27px, 2.7vw, 39px);
  letter-spacing: -1.2px;
  margin: 5px 0;
}
.hero p {
  font-size: 13px;
  line-height: 1.55;
  color: #e4eee5;
  max-width: 400px;
}
.hero-kicker {
  color: #d2e5cb;
  font-size: 10px;
}
.hero .btn {
  margin-top: 16px;
}
.btn,
.icon-btn {
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-weight: 620;
  border-radius: 7px;
  line-height: 1.25;
}
.btn {
  padding: 9px 13px;
  min-height: 36px;
  font-size: 12px;
}
.primary {
  color: #fff;
  background: var(--green);
}
.primary:hover {
  background: #0d472f;
}
.secondary,
.small {
  background: #fff;
  border-color: #d4dfd4;
  color: #284e37;
}
.secondary:hover,
.small:hover {
  background: #f0f6ee;
}
.hero-btn {
  background: #e5f2d7;
  color: #153e29;
  padding: 10px 16px;
}
.text {
  background: none;
  border: 0;
  padding: 4px 2px;
  min-height: 28px;
  color: #246744;
  font-size: 12px;
}
.icon-btn {
  height: 32px;
  width: 32px;
  background: #f1f4ee;
  border: 0;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 18px;
}
.metrics.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.metric,
.panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.metric {
  padding: 16px 17px;
  min-width: 0;
}
.metric-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  color: #465f50;
  font-size: 12px;
  font-weight: 600;
}
.metric-icon,
.dish-icon {
  display: inline-grid;
  place-items: center;
  background: #eff5e9;
  border-radius: 9px;
  width: 31px;
  height: 31px;
  color: #38714c;
}
.metric strong {
  display: block;
  font-size: clamp(19px, 2vw, 30px);
  letter-spacing: -1.1px;
  margin: 9px 0 4px;
  overflow-wrap: anywhere;
}
.metric small,
.bar-row small,
.species small,
.hint {
  font-size: 12px;
  color: var(--mute);
}
.two {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 16px;
}
.panel {
  padding: 18px 20px;
  margin-bottom: 16px;
  min-width: 0;
}
.panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}
.bar-row {
  margin: 14px 0;
}
.bar-row > div:first-child {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  gap: 10px;
}
.dot {
  margin-right: 8px;
}
.dot0,
.fill0 {
  background: #28764b;
}
.dot1,
.fill1 {
  background: #80a96a;
}
.dot2,
.fill2 {
  background: #bb9151;
}
.track {
  background: #edf1e9;
  border-radius: 4px;
  overflow: hidden;
  height: 6px;
  margin: 7px 0 3px;
}
.track i {
  display: block;
  height: 100%;
  border-radius: 4px;
}
.bar-row small {
  font-size: 10px;
}
.species {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 13px 0;
  border-top: 1px solid #e9eee8;
}
.species-symbol {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f4f7ee;
  color: #4b7654;
}
.species small {
  display: block;
  margin-top: 3px;
  font-size: 11px;
}
.species strong {
  margin-left: auto;
}
.scroll {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  white-space: nowrap;
}
th {
  font-size: 11px;
  color: #637568;
  background: #f5f7f2;
  font-weight: 650;
}
td,
th {
  padding: 10px 11px;
  border-bottom: 1px solid #e6ece4;
}
td {
  font-size: 13px;
}
tbody tr:last-child td {
  border-bottom: 0;
}
.empty {
  color: var(--mute);
  padding: 18px 5px;
  font-size: 13px;
}
.badge {
  border-radius: 20px;
  font-size: 11px;
  font-weight: 620;
  padding: 4px 8px;
  display: inline-block;
}
.badge.green {
  color: #226440;
  background: #e9f4e9;
}
.badge.amber {
  color: #82571f;
  background: #fbefdc;
}
.toolbar,
.dates,
.form-foot,
.tabs {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.toolbar,
.dates {
  margin: 0 0 18px;
}
.tabs {
  border: 1px solid var(--line);
  background: #fff;
  padding: 3px;
  border-radius: 9px;
  gap: 3px;
}
.tab {
  color: var(--mute);
  background: none;
}
.tab.active {
  background: #e3efdf;
  color: var(--green);
}
.dish-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(245px, 100%), 1fr));
  gap: 16px;
}
.dish-icon {
  height: 42px;
  width: 42px;
  margin-bottom: 16px;
}
.dish p {
  color: var(--mute);
  margin: 6px 0 22px;
}
.ingredient {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.dish h3 {
  margin-bottom: 6px;
}
.dish .text {
  margin-top: 9px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 620;
  color: #35503e;
}
input,
select {
  font-weight: 450;
  font-size: 14px;
  background: #fff;
  color: var(--ink);
  border: 1px solid #cdd9ce;
  border-radius: 7px;
  padding: 9px 10px;
  min-height: 39px;
  max-width: 100%;
  min-width: 0;
}
.toolbar select {
  min-width: 140px;
}
.dates label,
.toolbar label {
  font-size: 11px;
}
dialog {
  width: min(630px, 95vw);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0;
  color: var(--ink);
  max-height: 90dvh;
  box-shadow: 0 20px 80px #072f292e;
}
dialog::backdrop {
  background: #0d241b65;
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 15px 20px;
  gap: 8px;
}
.dialog-body {
  padding: 20px;
  display: grid;
  gap: 16px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.line-editor,
.form-grid > .hint,
.form-grid > output {
  grid-column: 1/-1;
}
.line-editor {
  display: grid;
  gap: 10px;
  background: #f7f9f4;
  border-radius: 10px;
  padding: 12px;
}
.line-editor > .btn {
  justify-self: start;
}
.repeat-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(74px, 0.8fr) auto;
  gap: 7px;
  align-items: end;
  margin: 7px 0;
}
.small {
  min-height: 38px;
  padding: 5px;
  font-size: 11px;
}
.form-foot {
  justify-content: flex-end;
}
.form-error {
  color: #a53623;
  font-weight: 600;
}
.form-error:empty {
  display: none;
}
output {
  background: var(--mint);
  color: var(--dark);
  font-weight: 650;
  padding: 13px 15px;
  border-radius: 8px;
  display: block;
}
.hint {
  line-height: 1.55;
}
.receipt-brand {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 700;
  font-size: 18px;
}
.receipt-brand img {
  width: 35px;
}
.login {
  min-height: 100dvh;
  display: grid;
  place-items: center;
}
.login .panel {
  max-width: 400px;
  padding: 30px;
}
.login h1,
.login h2,
.login p,
.login .btn {
  margin: 8px 5px 10px 0;
}
.login form {
  display: grid;
  gap: 12px;
}
.mobile-menu,
.scrim,
[hidden] {
  display: none !important;
}
#toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  max-width: 90vw;
  z-index: 8;
  background: #193d2e;
  color: white;
  border-radius: 9px;
  padding: 11px 16px;
  opacity: 0;
  pointer-events: none;
}
#toast.visible {
  opacity: 1;
}
@media (max-width: 1120px) {
  .layout {
    grid-template-columns: 205px minmax(0, 1fr);
  }
  .brand {
    padding: 0 13px;
  }
  .content {
    padding-inline: 22px;
  }
  .metric {
    padding: 12px;
  }
  .metrics {
    gap: 9px;
  }
  .panel {
    padding: 16px;
  }
  .hero {
    background-position: 69% 54%;
  }
}
@media (max-width: 820px) {
  .layout {
    display: block;
  }
  aside {
    position: fixed;
    left: -255px;
    width: 232px;
    transition: left 0.18s;
  }
  .nav-open aside {
    left: 0;
  }
  .nav-open .scrim {
    display: block !important;
    position: fixed;
    inset: 0;
    z-index: 2;
    background: #172e254d;
  }
  .mobile-menu {
    display: inline-flex !important;
    color: var(--green);
    padding: 5px;
    background: #f1f6ed;
  }
  .topbar {
    height: 52px;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .content {
    padding: 20px 16px 35px;
  }
  .metric strong {
    font-size: 24px;
  }
  .hero {
    min-height: 166px;
  }
  .date {
    font-size: 11px;
  }
  .two {
    gap: 10px;
  }
}
@media (max-width: 560px) {
  .two {
    grid-template-columns: 1fr;
  }
  .content {
    padding: 16px 12px 25px;
  }
  .hero {
    padding: 18px 16px;
    background-position: 68% center;
    border-radius: 12px;
  }
  .hero:before {
    background: linear-gradient(
      90deg,
      #113929 0%,
      #123b2ae8 45%,
      #163d2a44 100%
    );
  }
  .hero p {
    max-width: 235px;
    font-size: 12px;
  }
  .page-title {
    align-items: end;
  }
  .page-title h1 {
    font-size: 27px;
  }
  .date {
    font-size: 0;
    gap: 0;
  }
  .date svg {
    display: none;
  }
  .metric-label {
    font-size: 11px;
  }
  .metric-icon {
    width: 23px;
    height: 23px;
  }
  .metric strong {
    font-size: 21px;
  }
  .metric small {
    font-size: 10px;
  }
  .topbar > div:first-child > span,
  .topbar > div:first-child > svg {
    display: none;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .repeat-row {
    grid-template-columns: minmax(0, 1fr) 72px auto;
  }
  .panel {
    padding: 13px;
  }
  .panel > header {
    margin-bottom: 9px;
  }
  .metrics {
    margin-bottom: 12px;
  }
  .dates {
    align-items: end;
  }
  .dates input {
    width: 123px;
    padding: 7px;
  }
  .dialog-body {
    padding: 14px;
  }
  td,
  th {
    padding: 9px;
  }
  .hero-kicker {
    font-size: 9px;
  }
}
@media print {
  body {
    background: white;
  }
  body:has(dialog[open]) #app,
  dialog .form-foot,
  dialog .icon-btn,
  #toast {
    display: none !important;
  }
  dialog[open] {
    position: static;
    display: block;
    width: 100%;
    max-height: none;
    border: none;
    box-shadow: none;
  }
  dialog::backdrop {
    background: white;
  }
  .scroll {
    overflow: visible;
  }
  .dialog-head,
  .dialog-body {
    padding: 8px;
  }
  aside,
  .topbar,
  .toolbar,
  .dates {
    display: none;
  }
  .layout {
    display: block;
  }
  .panel {
    break-inside: avoid;
  }
}
