* { box-sizing: border-box; }
body {
  margin: 0;
  overscroll-behavior-x: none;
}
:root {
  --panel: #1c1815;
  --panel-2: #241f1b;
  --line: #342b25;
  --text: #f6efe7;
  --muted: #a3927f;
  --accent: #e5522d;
  --accent-2: #f2a23c;
  --green: #3fbf7f;
  --red: #e0655a;
  --radius: 14px;
}
body {
  background: radial-gradient(1100px 520px at 12% -10%, #2c1f19 0%, #14110f 60%) no-repeat, #14110f;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; font-weight: 700; }
h2 { font-size: 16px; }
h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
p { margin: 0; }
.muted { color: var(--muted); }
.right { text-align: right; }
.positive { color: var(--green); }
.negative { color: var(--red); }
.error { color: var(--red); font-size: 13px; min-height: 18px; }
.empty { color: var(--muted); font-size: 13px; padding: 18px; text-align: center; }
.hidden { display: none !important; }
input, select, textarea {
  font: inherit;
  font-size: 13px;
  color: var(--text);
  background: #100d0b;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 11px;
  width: 100%;
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(229,82,45,.16);
}
input[type="date"] { color-scheme: dark; }
.field { display: flex; flex-direction: column; gap: 6px; color: var(--muted); }
.field > span { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.check { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.check input { width: auto; }
.btn {
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  padding: 9px 14px;
  border-radius: 10px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { border-color: #4a3c33; }
.btn.primary { background: linear-gradient(140deg, var(--accent), #c8401f); border-color: transparent; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.small { padding: 6px 10px; font-size: 12px; }
.btn.wide { width: 100%; }
.icon-btn {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
  padding: 5px 7px;
  border-radius: 8px;
  cursor: pointer;
}
.icon-btn:hover { color: var(--red); background: #2a1f1b; }
/* login */
.login { position: fixed; inset: 0; display: grid; place-items: center; padding: 20px; z-index: 40; }
.login[hidden], .shell[hidden] { display: none; }
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px;
  box-shadow: 0 30px 80px rgba(0,0,0,.55);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.login-title { font-size: 20px; text-align: center; }
.login-card .muted { font-size: 13px; text-align: center; line-height: 1.5; }
/* shell */
.shell { max-width: 1300px; margin: 0 auto; padding: 18px 20px 70px; }
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: rgba(28,24,21,.9);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: sticky;
  top: 10px;
  z-index: 20;
  backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-icon {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  font-size: 21px;
}
.brand-icon.big { width: 56px; height: 56px; font-size: 30px; border-radius: 18px; align-self: center; }
.brand-name { font-weight: 700; letter-spacing: .2px; }
.brand-sub { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.tabs { display: flex; gap: 4px; background: #100d0b; padding: 4px; border-radius: 999px; border: 1px solid var(--line); margin-left: auto; }
.tab { background: transparent; border: 0; color: var(--muted); padding: 8px 16px; border-radius: 999px; cursor: pointer; font: inherit; font-size: 13px; font-weight: 600; }
.tab.active { background: var(--accent); color: #fff; }
.topbar-user { display: flex; align-items: center; gap: 10px; }
.who { font-size: 12px; color: var(--muted); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.content { margin-top: 16px; }
.view { display: none; }
.view.active { display: block; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.card { background: linear-gradient(160deg, #241f1b, #1a1613); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.card-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.card-value { font-size: 22px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; }
.panel { background: rgba(28,24,21,.78); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filters input, .filters select { width: auto; min-width: 130px; padding: 7px 10px; font-size: 12px; }
.split { display: grid; grid-template-columns: 300px 1fr; gap: 14px; align-items: start; }
.entry-form { background: #17130f; border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.row, .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-actions { display: flex; gap: 8px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--muted);
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}
td { padding: 9px 12px; border-bottom: 1px solid rgba(52,43,37,.6); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(255,255,255,.02); }
td.desc { color: #ddd2c7; max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; padding: 3px 8px; border-radius: 999px; }
.tag.entrada { background: rgba(63,191,127,.16); color: var(--green); }
.tag.saida { background: rgba(224,101,90,.16); color: var(--red); }
.pill { font-size: 11px; background: #100d0b; border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; color: var(--muted); }
.pills { display: flex; flex-wrap: wrap; gap: 5px; }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 10px; }
.menu-item { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.menu-item.off { opacity: .5; }
.menu-item header { display: flex; justify-content: space-between; gap: 6px; }
.menu-name { font-weight: 700; font-size: 14px; }
.menu-cat { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.menu-desc { font-size: 12px; color: var(--muted); line-height: 1.45; }
.menu-actions { display: flex; gap: 2px; }
.item-row { display: grid; grid-template-columns: 1fr 112px 64px 84px 28px; gap: 6px; align-items: center; margin-bottom: 8px; }
.item-row .item-price { font-size: 12px; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.order-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.order-total { display: flex; align-items: baseline; gap: 10px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.order-total strong { font-size: 20px; color: var(--text); letter-spacing: 0; text-transform: none; }
.board { display: grid; grid-template-columns: repeat(5, minmax(240px, 1fr)); gap: 12px; overflow-x: auto; margin-top: 14px; padding-bottom: 8px; }
.col { background: rgba(28,24,21,.7); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; min-height: 140px; }
.col-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); padding: 2px 4px 10px; }
.col-head .count { font-size: 10.5px; font-weight: 600; }
.col-body { display: flex; flex-direction: column; gap: 10px; }
.order { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 11px; display: flex; flex-direction: column; gap: 8px; }
.order.entregue { border-color: rgba(63,191,127,.35); }
.order.cancelado { opacity: .5; }
.order header { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.order header .muted { font-size: 11px; white-space: nowrap; }
.order-addr { font-size: 12px; color: var(--muted); line-height: 1.4; }
.order-items { margin: 0; padding-left: 16px; font-size: 12px; color: #e8ddd2; line-height: 1.5; }
.order-note { font-size: 11px; color: var(--accent-2); }
.order-meta { display: flex; flex-wrap: wrap; gap: 5px; }
.order-bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.order-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.order-actions .driver { width: 104px; padding: 5px 8px; font-size: 11px; }
.total { font-size: 14px; }
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(16px);
  background: #241f1b;
  border: 1px solid var(--line);
  color: var(--text);
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: .18s ease;
  z-index: 60;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.ok { border-color: rgba(63,191,127,.55); }
.toast.error { border-color: rgba(224,101,90,.55); }
@media (max-width: 880px) {
  .split { grid-template-columns: 1fr; }
  .row, .grid-2 { grid-template-columns: 1fr; }
  .board { grid-template-columns: repeat(5, minmax(220px, 1fr)); }
  .tabs { margin-left: 0; order: 3; width: 100%; justify-content: space-between; }
}
.hidden {
  display: none !important;
  /*position: absolute !important;
  z-index: -9999 !important;
  top: -20404px !important;
  opacity: 0 !important;*/
}
