:root {
  --orange: #ff8708;
  --orange-dark: #e46b00;
  --ink: #183e45;
  --text: #263744;
  --muted: #7c858e;
  --border: #e4e7ea;
  --surface: #fff;
  --bg: #f3f5f7;
  --green: #218b67;
  --red: #bf4d59;
  --shadow: 0 4px 18px #24394906;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  border: 1px solid transparent;
  background: none;
  color: inherit;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
input,
select {
  min-width: 0;
  border: 1px solid #d8dde2;
  border-radius: 7px;
  background: #fff;
  padding: 11px 12px;
  color: var(--text);
  width: 100%;
  outline: none;
}
input:focus,
select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px #ff87081a;
}
input:disabled {
  background: #f1f3f4;
}
label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 14px;
  font-weight: 600;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 30px;
  letter-spacing: -0.7px;
  margin: 6px 0 8px;
}
h2 {
  font-size: 20px;
  margin: 26px 0 15px;
}
small,
.small {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
table small {
  display: block;
}
strong {
  font-weight: 700;
}
.icon {
  width: 22px;
  height: 22px;
  vertical-align: middle;
  flex-shrink: 0;
}
.primary {
  background: linear-gradient(#ff9417, #ff8104);
  color: white;
  border: 1px solid #ed7900;
  border-radius: 8px;
  padding: 12px 18px;
  font-weight: 700;
  box-shadow: 0 2px 3px #e46b0012;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}
.primary:hover {
  background: var(--orange-dark);
}
.soft,
.soft-danger {
  border-radius: 7px;
  padding: 10px 13px;
  background: #eef1f3;
  border: 1px solid #e3e7eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.soft:hover {
  background: #e2e7eb;
}
.soft-danger {
  color: var(--red);
  background: #fff0f0;
  border-color: #ffe5e7;
}
.quiet {
  padding: 7px 9px;
  white-space: nowrap;
}
.quiet:hover {
  background: #00000008;
  border-radius: 6px;
}
.link {
  color: var(--orange-dark);
  text-decoration: underline;
  padding: 0;
}
.danger,
.delete {
  color: var(--red);
}
.delete {
  padding: 4px;
}
.success {
  color: var(--green);
}
.muted {
  color: var(--muted);
}
.wide {
  width: 100%;
}
.center {
  text-align: center;
}
.full {
  grid-column: 1/-1;
}
.eyebrow {
  font-size: 11px;
  color: var(--orange-dark);
  font-weight: 800;
  letter-spacing: 1.8px;
}
.button-group {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.brand {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1px;
  white-space: nowrap;
  color: #22464b;
}
.brand span {
  color: #6e7879;
}
.brand b {
  color: var(--orange);
  margin-left: 4px;
}
.app-header {
  display: flex;
  gap: 23px;
  align-items: center;
  padding: 19px 24px;
  background: white;
  min-height: 97px;
}
.store-title {
  border-left: 1px solid #cbd1d4;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 190px;
}
.store-title > strong {
  font-size: 19px;
}
.store-title > span {
  font-size: 13px;
  display: flex;
  gap: 5px;
  align-items: center;
  white-space: nowrap;
}
.store-title select {
  border: 0;
  padding: 3px 5px;
  background: #f5f7f7;
  font-size: 13px;
}
.header-food {
  font-size: 45px;
  white-space: nowrap;
  margin: auto;
  filter: saturate(0.75);
}
.header-right {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.header-right form {
  margin: 0;
}
.slogan {
  background: linear-gradient(95deg, #404342, #292b2b);
  color: #fff;
  padding: 8px 27px;
  text-align: right;
  font-size: 13px;
  font-style: italic;
  border-bottom: 3px solid var(--orange);
}
.slogan span {
  color: var(--orange);
  margin-left: 8px;
}
.main-nav {
  display: flex;
  align-items: stretch;
  padding: 0 18px;
  background: #4c4e4d;
  box-shadow: 0 3px 8px #0000000a;
  gap: 4px;
  overflow-x: auto;
}
.main-nav button {
  padding: 17px 18px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #fff;
  white-space: nowrap;
  font-weight: 600;
  font-size: 14px;
  border-radius: 8px 8px 0 0;
  margin-top: 6px;
}
.main-nav button.active {
  background: var(--orange);
}
.main-nav button:hover:not(.active) {
  background: #ffffff16;
}
main {
  padding: 18px 20px 78px;
  min-height: calc(100vh - 200px);
}
.panel {
  background: var(--surface);
  border-radius: 13px;
  box-shadow: var(--shadow);
  border: 1px solid #eef0f3;
}
.pos-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 426px;
  gap: 18px;
  align-items: start;
}
.catalog {
  padding: 17px;
}
.search {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #ccd2d7;
  border-radius: 9px;
  padding: 2px 11px;
  box-shadow: 0 1px 3px #00000009;
}
.search > span {
  color: #5e6d78;
}
.search input {
  border: none;
  box-shadow: none;
  padding: 12px 2px;
  font-size: 16px;
}
.search kbd {
  font: 11px inherit;
  color: #92999f;
  white-space: nowrap;
}
.category-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 16px 0 21px;
}
.category-tabs button {
  border: 1px solid #eef0f1;
  background: #f0f2f3;
  white-space: nowrap;
  flex: 1;
  border-radius: 8px;
  padding: 11px 15px;
  font-size: 14px;
}
.category-tabs button.active {
  background: #4c4d4c;
  color: #fff;
  border-color: #4c4d4c;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
}
.product-card {
  padding: 10px;
  border: 1px solid #e3e7e9;
  border-radius: 10px;
  box-shadow: 0 1px 2px #00000002;
  min-width: 0;
}
.product-visual {
  display: block;
  width: 100%;
  height: 155px;
  position: relative;
  background: radial-gradient(ellipse at 50% 70%, #f5f1e9, #fff 74%);
  border-radius: 7px;
}
.product-visual:hover {
  background: #fff8ed;
}
.product-visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.product-emoji {
  font-size: 80px;
  filter: drop-shadow(0 9px 7px #00000013);
}
.unit-tag {
  position: absolute;
  right: 3px;
  top: 2px;
  background: #f2f5f6;
  border: 1px solid #e7ecec;
  color: #617279;
  border-radius: 4px;
  font-size: 10px;
  padding: 3px 5px;
}
.product-card h3 {
  font-size: 14px;
  line-height: 1.35;
  margin-top: 9px;
  min-height: 38px;
  color: #22333d;
}
.stock {
  font-size: 12px;
  color: #7a858b;
  margin: 3px 0 8px;
}
.stock.danger {
  color: var(--red);
}
.product-bottom {
  display: flex;
  gap: 5px;
  align-items: stretch;
}
.product-bottom > strong {
  background: #4a4c4b;
  color: #fff;
  border-radius: 6px;
  flex: 1;
  padding: 11px 5px;
  text-align: center;
  font-size: 16px;
  white-space: nowrap;
}
.product-bottom small {
  font-size: 9px;
  color: #ccc;
  font-weight: 400;
}
.square {
  padding: 9px;
  width: 39px;
  flex-shrink: 0;
  border-radius: 7px;
}
.checkout {
  padding: 17px;
  position: sticky;
  top: 12px;
}
.customer-select {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.customer-select > .icon {
  width: 41px;
  height: 41px;
  background: #f1f1f0;
  border-radius: 8px;
  padding: 8px;
  color: #454a4c;
}
.customer-select label {
  flex: 1;
  font-size: 13px;
}
.customer-select select {
  padding: 8px 10px;
}
.cart-table-wrap {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: auto;
  max-height: 340px;
  min-height: 250px;
}
.cart-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.cart-table th {
  background: #eeefee;
  padding: 12px 7px;
  text-align: left;
  font-size: 11px;
}
.cart-table td {
  border-top: 1px solid var(--border);
  padding: 12px 7px;
  vertical-align: middle;
}
.cart-table th:nth-child(n + 2),
.cart-table td:nth-child(n + 2) {
  text-align: right;
}
.cart-table td:first-child {
  max-width: 140px;
}
.cart-table td strong {
  font-weight: 500;
}
.quantity-button {
  padding: 5px;
  border: 1px solid #e5e8eb;
  border-radius: 4px;
  min-width: 30px;
  background: #f8fafb;
}
.cart-empty {
  text-align: center !important;
  height: 210px;
  color: #9aa4a9;
  font-size: 14px;
  line-height: 2.2;
}
.cart-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 10px 0 19px;
  font-size: 12px;
}
.cart-tools button {
  font-size: 12px;
  padding: 8px 10px;
}
.cart-tools > span {
  font-size: 11px;
  color: #949ba0;
}
.checkout-inputs {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.checkout-inputs label {
  display: grid;
  grid-template-columns: 1fr 150px;
  align-items: center;
  font-weight: 400;
  font-size: 12px;
}
.checkout-inputs input,
.checkout-inputs select {
  padding: 8px 9px;
  background: #fafbfc;
}
.totals-row {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 14px;
}
.grand-total {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 13px;
  font-size: 22px;
  color: var(--ink);
  font-weight: 800;
  margin: 24px 0 14px;
}
.grand-total strong {
  font-size: 34px;
  letter-spacing: -1px;
}
.charge {
  padding: 17px 6px;
  font-size: 13px;
  margin-bottom: 7px;
}
.charge .icon {
  width: 22px;
  height: 22px;
}
.section {
  padding: 26px;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 25px;
}
.section-heading p {
  font-size: 13px;
  color: var(--muted);
}
.table-scroll {
  width: 100%;
  overflow-x: auto;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}
.data-table th {
  background: #f3f5f6;
  color: #76818b;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.6px;
  padding: 14px 12px;
  white-space: nowrap;
}
.data-table td {
  padding: 16px 12px;
  border-bottom: 1px solid #edf0f2;
}
.data-table td strong {
  font-size: 13px;
}
.data-table tr:hover td {
  background: #fafbfc;
}
.row-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
}
.row-actions button {
  font-size: 11px;
  padding: 7px 9px;
  background: #f0f3f5;
  border-radius: 5px;
}
.row-actions button.delete {
  background: #fff1f1;
}
.table-search {
  max-width: 440px;
  margin-bottom: 20px;
}
.no-data {
  padding: 40px !important;
  text-align: center;
  color: #89949b;
}
.empty {
  grid-column: 1/-1;
  text-align: center;
  margin: 35px auto;
  padding: 40px 10px;
  max-width: 450px;
}
.empty > .icon,
.empty > div .icon {
  width: 52px;
  height: 52px;
  color: #d1d9dc;
}
.empty h3 {
  margin: 19px 0 10px;
  font-size: 20px;
  color: #53696e;
}
.empty p {
  font-size: 14px;
  color: #87949a;
  line-height: 1.7;
  margin-bottom: 18px;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-bottom: 23px;
}
.metric {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 22px;
  background: #f7f9fa;
  border: 1px solid #e5ebee;
  border-radius: 10px;
  min-width: 0;
}
.metric > span {
  font-size: 12px;
  color: #697c84;
}
.metric > strong {
  font-size: 25px;
  color: #29494f;
  overflow-wrap: anywhere;
}
.metric.highlight {
  background: #fff5e7;
  border-color: #ffdfb4;
}
.metric.highlight > strong {
  color: #d97207;
}
.range-controls {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 23px;
}
.range-controls label {
  font-size: 11px;
  color: #6f7e87;
}
.range-controls input {
  padding: 8px 10px;
  max-width: 180px;
}
.range-controls > .muted {
  margin-left: auto;
  font-size: 12px;
  padding: 10px;
}
.reports-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
}
.settings-form {
  max-width: 950px;
}
.logo-preview {
  height: 70px;
  width: 150px;
  object-fit: contain;
  object-position: left;
  margin-top: 8px;
}
.alert {
  padding: 13px 15px;
  border-radius: 7px;
  background: #fff7e8;
  border: 1px solid #ffe5b6;
  font-size: 13px;
  line-height: 1.7;
  margin: 12px 0;
}
.alert.error {
  background: #fff0f0;
  border-color: #f6d9dc;
  color: var(--red);
}
#status-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #e9edf0ef;
  backdrop-filter: blur(7px);
  border-top: 1px solid #e1e5e8;
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 13px 23px;
  font-size: 12px;
  z-index: 5;
}
#status-bar > span {
  display: flex;
  align-items: center;
  gap: 8px;
}
.status-right {
  margin-left: auto;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-actions {
  grid-column: 1/-1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}
.form-grid input[type="file"] {
  padding: 8px;
  font-size: 11px;
}
.form-grid p {
  margin: 0;
}
dialog {
  width: 650px;
  max-width: calc(100vw - 24px);
  border: 0;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 20px 80px #0003;
  max-height: 90vh;
  overflow: auto;
  color: var(--text);
}
dialog::backdrop {
  background: #152c3a77;
  backdrop-filter: blur(3px);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 15px;
}
.modal-header h2 {
  margin: 0;
  font-size: 19px;
}
.ticket-frame {
  width: 100%;
  height: 450px;
  border: 1px solid #e5e8eb;
  border-radius: 6px;
  background: #fff;
}
.scale-widget {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
}
#scale-reading {
  display: inline-block;
  margin: 12px;
  color: var(--green);
}
#toast {
  position: fixed;
  bottom: 70px;
  left: 50%;
  transform: translate(-50%, 15px);
  background: #244d43;
  color: #fff;
  max-width: min(650px, 90vw);
  padding: 15px 24px;
  border-radius: 10px;
  z-index: 100;
  box-shadow: 0 8px 30px #0002;
  opacity: 0;
  pointer-events: none;
  transition: 0.15s;
  font-size: 13px;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
#toast.error {
  background: #9d3a43;
}
.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  background: #fff;
}
.login-art {
  padding: 55px 70px;
  background:
    radial-gradient(ellipse at 15% 30%, #fff6df, transparent 60%), #f4f6f3;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.brand.big {
  font-size: 37px;
}
.login-food {
  font-size: 72px;
  letter-spacing: 10px;
  margin: 65px 0 30px;
}
.login-art h1 {
  font-size: 54px;
  line-height: 1.12;
  color: var(--ink);
  letter-spacing: -2px;
  margin-bottom: 22px;
}
.login-art p {
  font-size: 17px;
  max-width: 390px;
  color: #738282;
  line-height: 1.7;
}
.login-art small {
  letter-spacing: 2px;
  margin-top: 50px;
}
.login-card {
  width: min(390px, 90%);
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 30px 0;
}
.login-card h2 {
  font-size: 29px;
  margin: 0;
}
.login-card > p {
  font-size: 14px;
  color: #899398;
}
.login-card small {
  font-size: 11px;
}
.login-card .primary {
  margin-top: 8px;
}
@media (min-width: 1700px) {
  .pos-layout {
    grid-template-columns: minmax(0, 1fr) 520px;
  }
  .product-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .product-visual {
    height: 200px;
  }
  .product-card h3 {
    font-size: 17px;
  }
  .product-bottom > strong {
    font-size: 21px;
  }
  .cart-table {
    font-size: 14px;
  }
  .checkout-inputs label {
    font-size: 14px;
    grid-template-columns: 1fr 200px;
  }
  .cart-table-wrap {
    max-height: 430px;
    min-height: 330px;
  }
  .checkout {
    padding: 21px;
  }
  .brand {
    font-size: 34px;
  }
  .main-nav button {
    font-size: 16px;
    padding: 19px 22px;
  }
}
@media (max-width: 1200px) {
  .header-food {
    display: none;
  }
  .header-right {
    margin-left: auto;
  }
  .app-header {
    gap: 16px;
    padding: 16px;
  }
  .brand {
    font-size: 23px;
  }
  .main-nav button {
    font-size: 12px;
    padding: 14px 13px;
  }
  .pos-layout {
    grid-template-columns: minmax(0, 1fr) 370px;
  }
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .product-visual {
    height: 120px;
  }
  .product-emoji {
    font-size: 63px;
  }
  .product-bottom > strong {
    font-size: 14px;
  }
  .grand-total strong {
    font-size: 30px;
  }
  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 900px) {
  .app-header {
    flex-wrap: wrap;
  }
  .header-right {
    width: 100%;
    border-top: 1px solid #eee;
    padding-top: 8px;
  }
  .brand {
    font-size: 26px;
  }
  .store-title {
    margin-left: auto;
  }
  .slogan {
    display: none;
  }
  .pos-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 10px;
  }
  main {
    padding: 12px 12px 85px;
  }
  .catalog,
  .checkout {
    padding: 12px;
  }
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
  .product-visual {
    height: 125px;
  }
  .category-tabs button {
    font-size: 12px;
  }
  .cart-table {
    font-size: 11px;
  }
  .cart-table td {
    padding: 9px 5px;
  }
  .checkout-inputs label {
    grid-template-columns: 1fr 130px;
  }
  #status-bar {
    gap: 12px;
    font-size: 10px;
    padding: 12px;
  }
  #status-bar .status-right {
    display: none;
  }
  .section {
    padding: 20px;
  }
  .section-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }
}
@media (max-width: 650px) {
  .pos-layout {
    grid-template-columns: 1fr;
  }
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .product-card {
    padding: 7px;
  }
  .product-visual {
    height: 95px;
  }
  .product-emoji {
    font-size: 52px;
  }
  .product-card h3 {
    font-size: 12px;
    min-height: 32px;
  }
  .product-bottom {
    gap: 4px;
    flex-wrap: wrap;
  }
  .product-bottom > strong {
    font-size: 13px;
    padding: 9px 4px;
  }
  .product-bottom small {
    display: none;
  }
  .square {
    width: 29px;
    padding: 6px;
  }
  .square .icon {
    width: 16px;
  }
  .checkout {
    position: static;
  }
  .cart-table {
    font-size: 13px;
  }
  .cart-table-wrap {
    min-height: 150px;
  }
  .main-nav {
    padding-left: 9px;
    gap: 0;
  }
  .main-nav button {
    font-size: 11px;
    padding: 12px 10px;
  }
  .main-nav .icon {
    width: 17px;
    height: 17px;
  }
  .brand {
    font-size: 22px;
  }
  .store-title {
    min-width: 0;
    max-width: 180px;
    padding-left: 14px;
  }
  .store-title strong {
    font-size: 14px;
  }
  .store-title > span {
    font-size: 10px;
  }
  .header-right {
    font-size: 10px;
  }
  .header-right .quiet {
    padding: 4px;
  }
  .app-header {
    gap: 10px;
    padding: 13px 12px;
  }
  #status-bar {
    flex-wrap: wrap;
    gap: 6px 14px;
  }
  #status-bar > strong {
    display: none;
  }
  #status-bar .icon {
    width: 14px;
    height: 14px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .metric-grid {
    gap: 9px;
  }
  .metric {
    padding: 14px;
    gap: 7px;
  }
  .metric > strong {
    font-size: 20px;
  }
  .metric > span {
    font-size: 11px;
  }
  .reports-grid {
    grid-template-columns: 1fr;
  }
  .section {
    padding: 16px;
  }
  h1 {
    font-size: 25px;
  }
  .section-heading {
    gap: 15px;
  }
  .button-group button {
    font-size: 11px;
    padding: 9px;
  }
  .range-controls {
    gap: 9px;
  }
  .range-controls input {
    max-width: 140px;
    font-size: 12px;
  }
  .range-controls > .muted {
    display: none;
  }
  .search input {
    font-size: 13px;
  }
  .search kbd {
    display: none;
  }
  dialog {
    padding: 18px;
  }
  .login-wrap {
    grid-template-columns: 1fr;
  }
  .login-art {
    padding: 28px;
    min-height: 210px;
  }
  .brand.big {
    font-size: 28px;
  }
  .login-food {
    display: none;
  }
  .login-art h1 {
    font-size: 34px;
    margin: 22px 0 12px;
  }
  .login-art h1 br {
    display: none;
  }
  .login-art p {
    font-size: 13px;
  }
  .login-art small {
    display: none;
  }
  .login-card {
    padding: 30px 0;
  }
  .login-card h2 {
    font-size: 26px;
  }
}
