:root {
  --ink: #f7f4ec;
  --muted: #b9b4aa;
  --line: #3b3935;
  --paper: #171716;
  --panel: #232321;
  --brand: #c83d27;
  --brand-2: #ff7047;
  --gold: #f0b35d;
  --danger: #ff725e;
  --ok: #b8e1a3;
  --soft: #2d2c29;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top right, rgba(23, 196, 181, 0.16), transparent 34rem),
    radial-gradient(circle at 0 20%, rgba(255, 112, 71, 0.12), transparent 26rem),
    var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 44px);
  border-bottom: 1px solid var(--line);
  background: rgba(31, 31, 29, 0.94);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
}

.nav {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  padding: 4px 0;
  scrollbar-width: thin;
}

.nav button,
.chip,
.icon-btn,
.primary,
.secondary,
.danger,
.ghost {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  padding: 9px 12px;
  font-weight: 750;
  white-space: nowrap;
}

.nav button.active,
.chip.active,
.primary {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.secondary {
  background: var(--soft);
  border-color: var(--line);
}

.danger {
  border-color: rgba(255, 114, 94, 0.35);
  background: rgba(255, 114, 94, 0.12);
  color: var(--danger);
}

.ghost {
  background: transparent;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  text-decoration: none;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.cart-pill {
  display: inline-grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  gap: 7px;
  min-width: 132px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: 0 10px 24px rgba(200, 61, 39, 0.28);
}

.cart-pill span {
  font-size: 18px;
}

.cart-pill em {
  display: grid;
  min-width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-style: normal;
  font-weight: 950;
}

.session-pill {
  display: inline-grid;
  grid-template-columns: 32px auto;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid rgba(138, 191, 255, 0.35);
  border-radius: 999px;
  background: rgba(138, 191, 255, 0.1);
  color: var(--ink);
  padding: 6px 12px 6px 6px;
  font-weight: 900;
}

.session-pill span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 999px;
  background: #8abfff;
  color: #122944;
  font-size: 13px;
  font-weight: 950;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 28px;
  padding: 34px clamp(16px, 5vw, 70px) 18px;
  align-items: stretch;
}

.hero-copy {
  display: flex;
  min-height: 360px;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  color: var(--brand-2);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 820px;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 0.95;
}

.hero p {
  max-width: 660px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.service-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 720px;
}

.service-strip div,
.summary-tile,
.info-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 14px;
}

.service-strip span,
.summary-tile span,
.muted {
  color: var(--muted);
}

.hero-board {
  display: grid;
  gap: 12px;
  align-content: center;
}

.daily-note {
  border: 1px solid #ead4a8;
  border-radius: 8px;
  background: #fff7e5;
  padding: 18px;
}

.daily-note strong {
  display: block;
  font-size: 20px;
}

.content {
  padding: 18px clamp(16px, 5vw, 70px) 46px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0 18px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.search {
  min-width: min(100%, 320px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 11px 12px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}

.product-card,
.panel,
.order-card,
.ticket {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 26px rgba(32, 35, 31, 0.06);
}

.product-card {
  display: grid;
  grid-template-rows: 118px 1fr;
  overflow: hidden;
}

.product-photo {
  position: relative;
  display: grid;
  width: 100%;
  height: 118px;
  place-items: center;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  overflow: hidden;
  padding: 0;
  background:
    linear-gradient(135deg, rgba(38, 103, 91, 0.22), rgba(212, 81, 42, 0.2)),
    #f3efe5;
  color: rgba(32, 35, 31, 0.55);
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.product-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scarcity {
  position: absolute;
  right: 4px;
  bottom: 4px;
  border-radius: 8px;
  background: #fff4cc;
  color: #7c5300;
  padding: 4px 5px;
  font-size: 10px;
  font-weight: 900;
}

.product-body {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 9px;
}

.product-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
  gap: 4px;
}

.product-meta h3 {
  overflow: hidden;
  display: -webkit-box;
  min-height: 34px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 14px;
  line-height: 1.2;
  text-overflow: ellipsis;
}

.product-meta .price {
  grid-row: 1;
  grid-column: 2;
}

.price {
  color: var(--brand);
  font-size: 16px;
  font-weight: 950;
  white-space: nowrap;
}

.tag {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 8px;
  background: var(--soft);
  color: var(--brand);
  padding: 3px 6px;
  font-size: 11px;
  font-weight: 850;
}

.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 50;
  display: none;
  width: min(460px, 100vw);
  overflow: auto;
  border-left: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(32, 35, 31, 0.48);
}

.product-detail {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(260px, 1.1fr);
  width: min(880px, 100%);
  max-height: min(720px, 92vh);
  overflow: auto;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.detail-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 26px;
  font-weight: 900;
}

.detail-photo {
  position: relative;
  display: grid;
  min-height: 380px;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(38, 103, 91, 0.22), rgba(212, 81, 42, 0.2)),
    #f3efe5;
  color: rgba(32, 35, 31, 0.55);
  font-size: 54px;
  font-weight: 950;
}

.detail-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-body {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 24px;
}

.detail-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.detail-title h2 {
  font-size: clamp(24px, 4vw, 38px);
  line-height: 1.05;
}

.detail-counter {
  max-width: 220px;
}

.detail-scarcity {
  right: 12px;
  bottom: 12px;
  padding: 7px 9px;
  font-size: 13px;
}

.drawer.open {
  display: block;
}

.drawer-head,
.drawer-foot {
  position: sticky;
  background: #fff;
  z-index: 1;
  padding: 16px;
}

.drawer-head {
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.drawer-foot {
  bottom: 0;
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
}

.pickup-note {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #252421;
  padding: 10px;
}

.pickup-note strong {
  color: var(--ink);
}

.pickup-note span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}

.cart-lines {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.cart-line {
  grid-template-columns: 1fr;
}

.cart-line-main {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.cart-note input {
  padding: 9px 10px;
}

.product-note input {
  padding: 9px 10px;
}

.product-card .product-note {
  grid-column: 1 / -1;
}

.order-item {
  margin: 0 0 8px;
}

.order-note {
  margin-top: 4px;
  border-left: 3px solid var(--gold);
  padding-left: 8px;
  color: var(--muted);
  font-weight: 750;
}

.qty {
  display: flex;
  align-items: center;
  gap: 6px;
}

.product-counter {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  align-items: center;
  min-height: 38px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1d1d1b;
}

.product-counter strong {
  display: grid;
  height: 100%;
  place-items: center;
  font-size: 16px;
}

.counter-btn {
  width: 36px;
  height: 38px;
  border: 0;
  background: var(--soft);
  color: var(--brand);
  font-size: 22px;
  font-weight: 950;
}

.counter-btn.add,
.counter-btn.remove:not(:disabled) {
  background: var(--brand);
  color: #fff;
}

.counter-btn:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.qty button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #302f2c;
  color: var(--ink);
}

.form-grid,
.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 11px 12px;
}

textarea {
  min-height: 86px;
  resize: vertical;
}

.account,
.admin {
  display: grid;
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto;
}

.panel {
  padding: 18px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 16px;
  scrollbar-width: thin;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 13px;
}

.table-sort {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  font-weight: 900;
  text-align: left;
}

.table-sort.active {
  color: var(--brand);
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.switch input {
  width: 18px;
  height: 18px;
}

.order-list {
  display: grid;
  gap: 12px;
}

.product-admin-list {
  display: grid;
  gap: 10px;
}

.product-edit {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #1d1d1b;
}

.edit-photo {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: var(--soft);
  color: var(--brand);
  font-size: 22px;
  font-weight: 950;
}

.edit-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.edit-fields {
  display: grid;
  gap: 8px;
}

.edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.product-quick-grid {
  display: grid;
  grid-template-columns: minmax(130px, 1.3fr) minmax(120px, 0.9fr) repeat(3, minmax(82px, 0.55fr)) auto;
  gap: 8px;
  align-items: end;
}

.product-quick-grid input,
.product-quick-grid select {
  min-height: 38px;
  padding: 8px 9px;
}

.quick-switch {
  min-height: 38px;
  align-self: end;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #282725;
  padding: 8px 10px;
}

.product-more {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.photo-drop {
  display: grid;
  gap: 5px;
  place-items: center;
  min-height: 112px;
  border: 1px dashed #6a625b;
  border-radius: 8px;
  background: #242321;
  color: var(--muted);
  padding: 14px;
  text-align: center;
}

.photo-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.photo-drop span {
  font-size: 26px;
}

.photo-drop strong {
  color: var(--ink);
}

.photo-drop small {
  color: var(--muted);
}

.photo-drop.dragging,
.photo-drop.has-file {
  border-color: var(--brand-2);
  background: rgba(255, 112, 71, 0.12);
}

.order-card {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.order-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.order-number {
  font-size: 28px;
  font-weight: 950;
}

.status {
  border-radius: 8px;
  padding: 7px 9px;
  font-weight: 900;
}

.status.pending {
  background: #fff4cc;
  color: #7c5300;
}

.status.preparing {
  background: #e7f0ff;
  color: #194f9b;
}

.status.ready {
  background: #e9f8eb;
  color: var(--ok);
}

.status.collected {
  background: #f0f0f0;
  color: #555;
}

.summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.danger-tile strong {
  color: var(--danger);
}

.ticket {
  max-width: 760px;
  margin: 0 auto;
  padding: 26px;
}

.ticket-business {
  display: grid;
  gap: 3px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
  padding-bottom: 14px;
  color: var(--muted);
}

.ticket-business strong {
  color: var(--ink);
  font-size: 22px;
}

.ticket-number {
  margin: 18px 0;
  border: 2px solid var(--brand);
  border-radius: 8px;
  padding: 20px;
  color: var(--brand);
  font-size: clamp(42px, 9vw, 88px);
  font-weight: 1000;
  text-align: center;
}

.ticket-actions,
.actions-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.notice {
  border: 1px solid #b8e1a3;
  border-radius: 8px;
  padding: 12px;
  background: #e8f7e5;
  color: #214f19;
  font-weight: 800;
}

.invoice-box {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #252421;
  color: var(--muted);
}

.invoice-box strong {
  color: var(--ink);
}

.invoice-box.compact {
  margin-top: 10px;
}

.stock-alerts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(240, 179, 93, 0.35);
  border-radius: 8px;
  background: rgba(240, 179, 93, 0.1);
  color: var(--gold);
  padding: 10px;
}

.stock-alerts strong {
  color: var(--ink);
}

.stock-alerts span {
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.2);
  padding: 5px 8px;
  font-weight: 800;
}

.ticket-footer {
  display: grid;
  gap: 6px;
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 14px;
  color: var(--muted);
  text-align: center;
}

.ticket-footer strong {
  color: var(--ink);
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.span-2 {
  grid-column: 1 / -1;
}

.error {
  border-radius: 8px;
  padding: 12px;
  background: #fff0ee;
  color: var(--danger);
  font-weight: 800;
}

.empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.hidden {
  display: none !important;
}

.admin .panel,
.product-card,
.order-card,
.ticket,
.drawer,
.drawer-head,
.drawer-foot,
.modal-backdrop .product-detail {
  background: var(--panel);
}

.daily-note,
.service-strip div,
.summary-tile,
.info-box {
  background: var(--panel);
  border-color: var(--line);
}

input,
select,
textarea,
.search {
  background: #2a2927;
  border-color: var(--line);
  color: var(--ink);
}

input::placeholder,
textarea::placeholder {
  color: #77716a;
}

.manual-order {
  display: grid;
  gap: 16px;
}

.step-panel {
  display: grid;
  gap: 14px;
}

.step-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.step-title span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-weight: 950;
}

.customer-results,
.manual-product-list,
.special-list {
  display: grid;
  gap: 8px;
}

.customer-result,
.manual-product-row {
  display: grid;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #292826;
  color: var(--ink);
  padding: 10px;
  text-align: left;
}

.customer-result {
  grid-template-columns: 1fr;
}

.customer-result.active {
  border-color: #8abfff;
  box-shadow: 0 0 0 2px rgba(138, 191, 255, 0.22);
}

.customer-result span,
.manual-product-row span {
  display: block;
  color: var(--muted);
}

.manual-filters {
  display: grid;
  gap: 10px;
}

.manual-product-list {
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.manual-product-row {
  grid-template-columns: 54px minmax(0, 1fr) auto 122px;
}

.manual-product-photo {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1d1d1b;
  color: var(--muted);
  font-weight: 900;
}

.manual-product-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.manual-product-price {
  color: var(--brand-2);
  font-size: 18px;
  font-weight: 950;
  white-space: nowrap;
}

.icon-add {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #302f2c;
  color: var(--ink);
  font-size: 24px;
  font-weight: 950;
}

.manual-row-counter {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  align-items: center;
  min-width: 112px;
  min-height: 42px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1d1d1b;
}

.manual-row-counter button {
  width: 36px;
  height: 42px;
  border: 0;
  background: var(--brand);
  color: #fff;
  font-size: 22px;
  font-weight: 950;
}

.manual-row-counter button:disabled {
  background: var(--soft);
  color: var(--brand);
  opacity: 0.45;
}

.manual-row-counter strong {
  display: grid;
  height: 100%;
  place-items: center;
  font-size: 18px;
}

.manual-cart-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1d1d1b;
  padding: 12px;
}

.manual-cart-summary span {
  color: var(--brand-2);
  font-size: 22px;
  font-weight: 950;
}

.manual-cart-lines {
  max-height: 430px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1d1d1b;
}

.kitchen-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.kitchen-toolbar {
  margin-bottom: 12px;
}

.kitchen-column {
  display: grid;
  align-content: start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1d1d1b;
  padding: 12px;
}

.kitchen-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #292826;
  padding: 12px;
}

.kitchen-head,
.client-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.kitchen-head strong {
  color: var(--brand-2);
  font-size: 24px;
}

.kitchen-head span {
  border-radius: 999px;
  background: var(--soft);
  padding: 5px 8px;
  font-weight: 900;
}

.compact-lines {
  border-bottom: 0;
  padding-bottom: 0;
}

.compact-field {
  max-width: 240px;
}

.client-list {
  display: grid;
  gap: 10px;
}

.client-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1d1d1b;
  padding: 14px;
}

.client-card strong,
.client-card span {
  display: block;
}

.client-metrics {
  min-width: 130px;
  text-align: right;
}

.client-metrics span {
  color: var(--muted);
}

.client-metrics strong {
  color: var(--brand-2);
  font-size: 20px;
}

.client-billing,
.client-history {
  display: grid;
  gap: 4px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  color: var(--muted);
}

.tariff-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.tariff-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 16px;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.segmented button {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1c1c1a;
  color: var(--muted);
  font-weight: 900;
}

.segmented button.active {
  border-color: #8abfff;
  background: #e8f3ff;
  color: #174b7f;
}

.segmented button.active.weekend {
  border-color: var(--gold);
  background: #fff0d8;
  color: #a4651f;
}

.special-days {
  margin-top: 18px;
}

.number-cell {
  text-align: right;
}

.number-input {
  text-align: right;
  max-width: 140px;
}

.number-input.price-zero {
  border-color: var(--danger);
  background: rgba(255, 114, 94, 0.16);
  color: #ffb8ae;
  box-shadow: 0 0 0 2px rgba(255, 114, 94, 0.12);
}

.price-warning {
  display: block;
  margin-top: 4px;
  color: var(--danger);
  font-size: 11px;
  font-weight: 950;
  text-align: right;
}

.order-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.order-identity .muted {
  display: block;
}

.order-lines {
  display: grid;
  gap: 6px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.order-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.order-note {
  grid-column: 1 / -1;
}

.order-total,
.order-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.order-total strong {
  font-size: 24px;
}

.payment-pill {
  border-radius: 8px;
  background: #e7f5d8;
  color: #3d641d;
  padding: 6px 10px;
  font-weight: 900;
}

.payment-edit {
  display: grid;
  grid-template-columns: auto minmax(120px, 170px);
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 900;
}

.payment-edit select {
  min-height: 40px;
  padding: 8px 10px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.stats-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 16px;
}

.bar-chart {
  display: grid;
  gap: 12px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(140px, 2fr) auto;
  align-items: center;
  gap: 10px;
}

.bar-label {
  overflow: hidden;
  color: var(--ink);
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #171716;
}

.bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

.bar-row strong {
  color: var(--brand-2);
  white-space: nowrap;
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .topbar {
    position: static;
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    gap: 10px;
    padding: 12px;
  }

  .brand {
    justify-content: flex-start;
    min-width: 0;
  }

  .brand strong {
    font-size: 20px;
  }

  .brand small {
    font-size: 14px;
    line-height: 1.25;
  }

  .nav {
    justify-content: flex-start;
    width: 100%;
  }

  .nav button {
    min-height: 44px;
    padding: 10px 14px;
    font-size: 15px;
  }

  .top-actions {
    justify-content: stretch;
  }

  .cart-pill {
    width: 100%;
    justify-content: center;
  }

  .hero-copy {
    min-height: auto;
  }

  .service-strip,
  .form-grid,
  .admin-grid,
  .product-edit,
  .kitchen-board {
    grid-template-columns: 1fr;
  }

  .summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .summary .summary-tile:nth-child(4) {
    grid-column: 1 / -1;
  }

  .tabs {
    margin-inline: -4px;
    padding-inline: 4px;
  }

  .tabs .chip {
    min-width: max-content;
  }

  .panel-head {
    align-items: flex-start;
  }

  .edit-photo {
    width: 100%;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  .product-detail {
    grid-template-columns: 1fr;
  }

  .detail-photo {
    min-height: 260px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .client-top,
  .kitchen-head {
    display: grid;
  }

  .client-metrics {
    text-align: left;
  }
}

@media (max-width: 520px) {
  .content {
    padding-inline: 10px;
  }

  .admin > .panel {
    padding: 14px;
  }

  .panel-head {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
  }

  .panel-head h2 {
    font-size: 28px;
    line-height: 1.05;
  }

  .panel-head p {
    font-size: 15px;
  }

  .panel-head .secondary {
    min-height: 44px;
    padding-inline: 14px;
  }

  .summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .summary-tile {
    min-height: 84px;
    padding: 12px 10px;
  }

  .summary-tile strong {
    font-size: 22px;
  }

  .summary-tile span {
    font-size: 13px;
  }

  .product-meta h3 {
    font-size: 14px;
  }

  .price {
    font-size: 16px;
  }

  .product-counter {
    grid-template-columns: 32px 1fr 32px;
  }

  .counter-btn {
    width: 32px;
  }

  .manual-product-row {
    grid-template-columns: 46px minmax(0, 1fr) 86px;
  }

  .manual-product-price {
    grid-column: 2;
    font-size: 15px;
  }

  .manual-row-counter {
    grid-column: 3;
    grid-row: 1 / span 2;
    min-width: 86px;
    grid-template-columns: 28px 1fr 28px;
  }

  .manual-row-counter button {
    width: 28px;
  }

  .bar-row {
    grid-template-columns: 1fr auto;
  }

  .bar-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

.admin > .panel {
  border: 1px solid var(--line);
}

.summary-tile strong {
  display: block;
  font-size: clamp(22px, 4vw, 30px);
  line-height: 1;
}
