:root {
  --bg: #eef1ed;
  --panel: #fbfcf8;
  --ink: #17201b;
  --muted: #68746d;
  --line: #d7ddd4;
  --accent: #146b5d;
  --accent-2: #e0aa3e;
  --red: #bc4b40;
  --blue: #315c9a;
  --green: #167463;
  --green-800: #0f604f;
  --green-soft: #dcece6;
  --shadow: 0 18px 50px rgba(28, 40, 32, 0.12);
  --native-bottom-inset: 0px;
  --tablet-nav-reserve: 0px;
  --app-bottom-safe: max(env(safe-area-inset-bottom, 0px), var(--native-bottom-inset), var(--tablet-nav-reserve));
}

.hidden,
[hidden] {
  display: none !important;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  height: 100vh;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow: hidden;
}

body.android-asset-app {
  --tablet-nav-reserve: 48px;
}

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

button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
}

button:hover {
  border-color: #9fac9f;
}

.nav:hover {
  border-color: transparent;
  background: #f1f2f0;
}

button:disabled {
  color: #9aa39c;
  background: #eef1ed;
  cursor: not-allowed;
}

button.is-busy,
button[aria-busy="true"] {
  opacity: 0.78;
  pointer-events: none;
}

button.primary {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}

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

input,
select {
  min-height: 38px;
  padding: 0 11px;
}

#globalSearch {
  border-radius: 20px;
}

textarea {
  padding: 10px;
  resize: vertical;
}

h1,
h2,
p {
  margin: 0;
}

.app {
  height: 100vh;
  min-height: 0;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  overflow: hidden;
}

.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 12px;
  border-right: 1px solid var(--line);
  background: #f7f9f5;
  overflow-y: auto;
}

.brand-block {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.brand-block strong,
.brand-block small,
.rail-footer strong,
.rail-footer small {
  display: block;
}

.brand-block strong {
  font-size: 14px;
}

.brand-block small,
.rail-footer small {
  color: var(--muted);
  font-size: 12px;
}

.logo {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  color: #fff;
  background: #101712;
  font-weight: 800;
}

.nav-tree {
  display: grid;
  gap: 10px;
}

.rail-menu-button {
  display: none;
}

.nav-group {
  display: grid;
  gap: 0;
}

.nav-parent {
  min-height: 26px;
  display: flex;
  align-items: center;
  width: 100%;
  border-color: transparent;
  border-radius: 7px;
  padding: 0 8px;
  color: #33413a;
  background: transparent;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  text-align: left;
}

.nav-parent::before {
  content: "";
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin-right: 8px;
  background: #6f7d74;
  -webkit-mask: var(--nav-icon) center / contain no-repeat;
  mask: var(--nav-icon) center / contain no-repeat;
}

.nav-group:nth-child(1) .nav-parent {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19V5'/%3E%3Cpath d='M4 19h16'/%3E%3Cpath d='M8 16v-5'/%3E%3Cpath d='M12 16V8'/%3E%3Cpath d='M16 16v-8'/%3E%3C/svg%3E");
}

.nav-group:nth-child(2) .nav-parent {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Cpath d='M8 2v4'/%3E%3Cpath d='M16 2v4'/%3E%3Cpath d='M3 10h18'/%3E%3Cpath d='M8 14h.01'/%3E%3Cpath d='M12 14h.01'/%3E%3Cpath d='M16 14h.01'/%3E%3C/svg%3E");
}

.nav-group:nth-child(3) .nav-parent {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 7V6a2 2 0 0 0-2-2H5a2 2 0 0 0 0 4h14a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6'/%3E%3Cpath d='M16 14h.01'/%3E%3C/svg%3E");
}

.nav-group:nth-child(4) .nav-parent {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6h16'/%3E%3Cpath d='M4 12h16'/%3E%3Cpath d='M4 18h10'/%3E%3Cpath d='M18 15v6'/%3E%3Cpath d='M15 18h6'/%3E%3C/svg%3E");
}

.nav-group:nth-child(5) .nav-parent {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z'/%3E%3Cpath d='m3.3 7 8.7 5 8.7-5'/%3E%3Cpath d='M12 22V12'/%3E%3C/svg%3E");
}

.nav-group:nth-child(6) .nav-parent {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 11 18-5v12L3 14v-3Z'/%3E%3Cpath d='M11.6 16.8a3 3 0 1 1-5.8-1.6'/%3E%3C/svg%3E");
}

.nav-group:nth-child(7) .nav-parent {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
}

.nav-group:nth-child(8) .nav-parent {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10Z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E");
}

.nav-parent.active::before,
.nav-group.expanded .nav-parent::before {
  background: var(--accent);
}

.nav-group:hover .nav-parent::before {
  background: var(--accent);
}

.nav-parent::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-right: 1.25px solid #6f7d74;
  border-bottom: 1.25px solid #6f7d74;
  transform: rotate(-45deg);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.nav-group.expanded .nav-parent::after,
.nav-group:hover .nav-parent::after {
  border-color: #6f7d74;
  transform: rotate(45deg) translate(-1px, -1px);
}

.nav-group.expanded .nav-parent {
  color: var(--ink);
}

.nav-parent.active {
  color: var(--ink);
  background: #e8f3ef;
}

.nav {
  align-items: center;
  display: flex;
  justify-content: flex-start;
  width: 100%;
  min-height: 0;
  max-height: 0;
  border-color: transparent;
  border-radius: 20px;
  margin-top: 0;
  padding: 0 8px 0 20px;
  text-align: left;
  color: #516158;
  background: transparent;
  font-size: 14px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition: max-height 0.32s ease, min-height 0.32s ease, opacity 0.26s ease, transform 0.36s cubic-bezier(0.22, 1, 0.36, 1), margin-top 0.32s ease, background-color 0.18s ease;
}

.nav-group.expanded .nav,
.nav-group:hover .nav {
  min-height: 30px;
  max-height: 34px;
  margin-top: 4px;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav.active {
  color: #0c5449;
  border-color: transparent;
  background: #e8f3ef;
  font-weight: 600;
}

.nav.restricted {
  display: none;
}

.nav-group.restricted {
  display: none;
}

.rail-footer {
  display: grid;
  grid-template-columns: 18px 1fr 38px;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding: 12px 8px 4px;
  border-top: 1px solid var(--line);
}

.rail-settings-button {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 8px;
  font-size: 18px;
  line-height: 1;
}

.venue-settings-window {
  width: min(680px, calc(100vw - 40px));
}

.settings-section {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 0.8fr);
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.settings-section h3 {
  margin: 0 0 4px;
}

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

.settings-section label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.settings-section input[type="number"] {
  width: 100%;
  font-size: 22px;
  font-weight: 900;
}

.settings-toggle {
  grid-column: 2;
}

.settings-grid {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 14px;
}

.settings-page-body {
  display: grid;
  gap: 14px;
  padding-bottom: 72px;
}

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

.settings-overview-card {
  display: grid;
  min-width: 0;
  gap: 5px;
  padding: 14px;
  border: 1px solid #d8e5dd;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(18, 32, 28, 0.04);
}

.settings-overview-card small {
  color: var(--muted);
  font-weight: 800;
}

.settings-overview-card strong {
  overflow: hidden;
  font-size: 22px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-overview-card span {
  overflow: hidden;
  color: var(--muted);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-workspace-section {
  display: none;
  min-width: 0;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  scroll-margin-top: 18px;
  box-shadow: 0 8px 22px rgba(18, 32, 28, 0.035);
}

.settings-workspace-section.active {
  display: grid;
}

.settings-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.settings-section-head > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.settings-section-head h3 {
  margin: 0 0 4px;
  font-size: 22px;
}

.settings-section-head small,
.module-toggle-card small {
  color: var(--muted);
}

.table-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
}

.table-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
}

.settings-section-subhead,
.settings-subsection-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.settings-section-subhead h4 {
  margin: 0;
  font-size: 18px;
}

.settings-section-subhead small {
  color: var(--muted);
  font-weight: 700;
}

.settings-subsection-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.settings-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
}

.settings-form-grid label {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid #e4ece7;
  border-radius: 8px;
  background: #fbfdfb;
  color: var(--muted);
  font-weight: 800;
}

.settings-form-grid input,
.settings-form-grid select {
  width: 100%;
}

.settings-inline-toggle {
  display: flex !important;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  align-content: center;
  padding: 10px 12px;
}

.settings-inline-toggle span {
  display: grid;
  gap: 2px;
}

.settings-inline-toggle small {
  color: var(--muted);
  font-weight: 700;
}

.settings-left-actions {
  justify-content: flex-start;
}

.delivery-settings-zones,
.delivery-settings-channels {
  display: grid;
  min-width: 0;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-gutter: stable;
}

.delivery-settings-zones .delivery-zone,
.delivery-settings-channels .delivery-integration {
  min-width: 980px;
}

.settings-workspace-section .delivery-map-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfdfb;
}

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

.online-site-summary div,
.online-site-preview-list span {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfb;
}

.online-site-summary small,
.online-site-preview-list small {
  color: var(--muted);
  font-weight: 700;
}

.online-site-summary strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.online-site-form-grid .wide {
  grid-column: 1 / -1;
}

.online-site-preview-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.online-site-preview-list span {
  grid-template-columns: 44px 1fr;
  align-items: center;
}

.online-site-preview-list span .dish-visual {
  grid-row: span 2;
}

.online-site-category-table-wrap,
.online-site-catalog-table-wrap {
  overflow-x: auto;
}

.online-site-category-table,
.online-site-catalog-table {
  min-width: 760px;
}

.online-site-catalog-table td:nth-child(5) {
  min-width: 260px;
}

@media (max-width: 860px) {
  .online-site-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .online-site-summary {
    grid-template-columns: 1fr;
  }
}

.compact-toggle {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 800;
}

.module-toggle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px;
}

.module-toggle-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbf8;
}

.module-toggle-card span {
  display: grid;
  gap: 3px;
}

.security-rule-grid {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.security-rule-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(220px, 320px);
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.security-rule-row span {
  color: var(--ink);
  font-weight: 900;
}

.security-rule-row select {
  width: 100%;
}

.device-pairing-panel {
  display: grid;
  grid-template-columns: minmax(280px, 1.2fr) repeat(2, minmax(220px, 1fr));
  gap: 12px;
  align-items: stretch;
}

.device-pairing-code-card,
.device-pairing-qr-card,
.device-pairing-info-card {
  display: grid;
  gap: 10px;
  align-content: start;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfb;
}

.device-pairing-code-card label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.device-pairing-code-card input {
  width: 100%;
}

.device-pairing-code-card strong {
  font-size: 34px;
  line-height: 1;
  letter-spacing: 0;
  color: var(--green);
  overflow-wrap: anywhere;
}

.device-pairing-code-card span,
.device-pairing-qr-card span,
.device-pairing-info-card h4 {
  color: var(--ink);
  font-weight: 900;
}

.device-pairing-qr-card {
  justify-items: center;
  text-align: center;
}

.device-pairing-qr-card img {
  width: min(220px, 100%);
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
}

.device-pairing-manual {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 10px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font: 700 12px/1.35 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-align: left;
}

.device-pairing-info-card ol {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-weight: 700;
}

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

.device-pairing-status-row {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.device-pairing-status-row:last-child {
  border-bottom: 0;
}

.device-pairing-status-row span {
  color: var(--muted);
  font-weight: 800;
}

.device-pairing-status-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.settings-device-status-panel {
  grid-template-columns: repeat(2, minmax(260px, 1fr));
}

.location-detail-window {
  gap: 0;
}

.location-detail-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 14px;
  padding: 14px;
  background: #f5f8f4;
}

.location-detail-section {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.location-detail-grid,
.location-tablet-settings {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.location-detail-grid .wide {
  grid-column: 1 / -1;
}

.location-operation-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 10px;
  align-items: stretch;
}

.location-operation-grid label,
.location-operation-grid > div {
  display: grid;
  gap: 6px;
  align-content: start;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfb;
}

.location-operation-grid small {
  color: var(--muted);
  font-weight: 800;
}

.location-operation-grid strong {
  overflow-wrap: anywhere;
}

.location-pairing-main-actions {
  margin-top: -2px;
}

.location-device-pairing-panel {
  grid-template-columns: repeat(2, minmax(260px, 1fr));
}

.location-pairing-card .device-pairing-manual {
  font-size: 11px;
}

.location-detail-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: var(--panel);
}

.receipt-settings-hint {
  align-self: stretch;
}

.receipt-prediction-toggle {
  margin: 12px 0;
}

.receipt-predictions-list {
  display: grid;
  gap: 8px;
}

.receipt-prediction-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.receipt-prediction-row input {
  width: 100%;
}

.settings-nav-list {
  display: grid;
  grid-template-columns: repeat(7, minmax(104px, 1fr));
  gap: 8px;
  overflow: visible;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf7;
}

.settings-nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border-color: #dce5df;
  border-radius: 8px;
  background: #fbfcfa;
  text-align: center;
  white-space: normal;
}

.settings-nav-item span {
  font-weight: 900;
  line-height: 1.12;
}

.settings-nav-item.active {
  border-color: #86c9b8;
  background: #e7f4ef;
  color: #0f5f52;
  box-shadow: inset 0 -3px 0 #147964;
}

.muted-settings-section {
  background: #f9faf7;
}

.payment-provider-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.payment-provider-summary div {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf7;
}

.payment-provider-summary strong,
.payment-provider-summary small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-provider-summary strong {
  font-size: 20px;
  line-height: 1.1;
}

.payment-provider-summary small {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 800;
}

.settings-payment-provider-table input[type="password"] + small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 700;
}

.settings-actions {
  position: sticky;
  z-index: 5;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  margin: 4px -4px 0;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(238, 241, 237, 0), var(--bg) 35%);
}

body.android-asset-app .settings-actions {
  bottom: var(--app-bottom-safe);
}

.main {
  min-width: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
}

body.android-asset-app .main {
  scroll-padding-bottom: calc(24px + var(--app-bottom-safe));
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 460px) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(238, 241, 237, 0.92);
  backdrop-filter: blur(16px);
}

.eyebrow {
  color: var(--muted);
  font-size: 12px;
}

h1 {
  margin-top: 2px;
  font-size: 22px;
}

h2 {
  font-size: 16px;
}

.status-strip {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.role-switcher {
  position: relative;
  display: grid;
  grid-template-columns: auto 168px;
  align-items: center;
  gap: 7px;
}

.role-switcher select {
  position: absolute;
  width: 1px;
  min-height: 0;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.role-dropdown {
  position: relative;
  width: 168px;
  min-width: 0;
}

.role-dropdown-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  width: 100%;
  min-height: 32px;
  border-radius: 20px;
  padding: 0 38px 0 14px;
  color: var(--ink);
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236f7d74' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px 14px;
  font-size: 12px;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-dropdown.open .role-dropdown-toggle {
  border-color: #b8d3c9;
  background-color: #f7fbf8;
}

.role-dropdown-toggle:focus-visible {
  outline: 2px solid #b8d3c9;
  outline-offset: 2px;
}

.role-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 70;
  display: grid;
  min-width: 100%;
  width: max-content;
  max-width: min(260px, calc(100vw - 28px));
  padding: 6px;
  border: 1px solid #d7dfd8;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(28, 40, 32, 0.12);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.role-dropdown.open .role-dropdown-menu {
  opacity: 1 !important;
  pointer-events: auto;
  transform: translateY(0) !important;
}

.role-dropdown-option {
  min-height: 32px;
  justify-content: flex-start;
  border-color: transparent;
  border-radius: 10px;
  padding: 0 10px;
  color: #33413a;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
}

.role-dropdown-option:hover,
.role-dropdown-option:focus {
  outline: none;
  border-color: transparent;
  background: #e8f3ef;
  color: #0c5449;
}

.role-dropdown-option.active {
  color: #0c5449;
  background: #dcece6;
}

.signal {
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 700;
}

.online {
  color: #0b604c;
  background: #dcece6;
}

.view {
  display: none;
  min-width: 0;
  padding: 22px;
}

.view.active {
  display: block;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.metric,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.metric {
  padding: 16px;
}

#dashboard .metric {
  padding-right: 24px;
  padding-left: 24px;
  border: 0.5px solid #D1D7CE;
  border-radius: 40px;
  box-shadow: 4px 4px 16px rgba(15, 24, 20, 0.06);
}

#dashboard .sales-panel {
  padding-right: 24px;
  padding-left: 24px;
  border-radius: 40px;
  box-shadow: 4px 4px 16px rgba(15, 24, 20, 0.06);
}

#dashboard .sales-panel .panel-head {
  flex-direction: row;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  padding: 0;
}

#dashboard .sales-panel .panel-head h2 {
  min-width: 0;
}

#dashboard .sales-panel .badge.calm {
  flex: 0 0 auto;
  padding-right: 24px;
  padding-left: 24px;
  font-weight: 600;
  white-space: nowrap;
}

#dashboard .metric-primary {
  background: linear-gradient(180deg, #B8DCCD 0%, #45897F 100%);
}

#dashboard .metric-primary span,
#dashboard .metric-primary strong,
#dashboard .metric-primary small {
  color: #fff;
  text-shadow: 2px 2px 16px rgba(0, 0, 0, 0.18);
}

.metric span,
.metric small,
.panel-head span,
.row small,
.muted {
  color: var(--muted);
}

.metric strong {
  display: block;
  margin: 8px 0 6px;
  font-size: 28px;
}

.sales-delta {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 22px;
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--muted);
  background: #eef3ef;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

.sales-delta.up {
  color: #0b604c;
  background: #dcece6;
}

.sales-delta.down {
  color: #9f2e2e;
  background: #f8dfdc;
}

.sales-delta.flat {
  color: #6c756e;
  background: #eef3ef;
}

.metric.warn strong {
  color: var(--red);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(480px, 1.6fr) minmax(300px, 0.9fr);
  min-width: 0;
  gap: 16px;
}

.panel {
  min-width: 0;
  padding: 16px;
}

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

.panel-head.subhead {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.panel-actions button {
  min-height: 32px;
}

.inline-action-label {
  display: grid;
  gap: 4px;
  min-width: 240px;
  color: var(--muted);
  font-weight: 700;
}

.modifier-catalog-table input,
.modifier-catalog-table select {
  min-width: 0;
}

.badge,
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--accent);
  background: var(--green-soft);
  font-size: 12px;
  font-weight: 700;
}

.badge.calm {
  color: #5d4818;
  background: #f5ebd3;
}

canvas,
.chart-surface {
  width: 100%;
  height: auto;
  border-radius: 6px;
  background: transparent;
}

#salesChart,
#analyticsChart {
  cursor: crosshair;
}

.chart-surface {
  aspect-ratio: var(--chart-ratio, 760 / 260);
  overflow: visible;
}

#analyticsChart {
  --chart-ratio: 960 / 340;
}

#ownerRevenueChart {
  --chart-ratio: 980 / 300;
}

.chart-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.chart-grid-line {
  stroke: #d9dfd5;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.chart-axis {
  fill: none;
  stroke: #bfc8c0;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.chart-line {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.chart-area {
  pointer-events: none;
}

.chart-tick,
.chart-axis-title {
  fill: #69736b;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 700;
}

.chart-tick {
  font-size: 13px;
  font-weight: 600;
}

.chart-point {
  outline: none;
}

.chart-point.is-clickable {
  cursor: pointer;
}

.chart-point-hit {
  fill: transparent;
}

.chart-point-dot {
  fill: #fff;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.chart-point.is-clickable:hover .chart-point-dot,
.chart-point.is-clickable:focus .chart-point-dot {
  fill: #fff9de;
  stroke-width: 4;
}

#salesChart.dashboard-revenue-chart {
  --chart-ratio: 760 / 238;
  cursor: pointer;
}

#salesChart.dashboard-revenue-chart .chart-grid-line {
  stroke: rgba(120, 135, 126, 0.22);
  stroke-dasharray: 10 12;
}

#salesChart.dashboard-revenue-chart .chart-axis {
  display: block;
  stroke: rgba(120, 135, 126, 0.28);
  stroke-width: 1.1;
}

#salesChart.dashboard-revenue-chart .chart-area {
  opacity: 1;
}

#salesChart.dashboard-revenue-chart .chart-line {
  stroke-width: 4.2;
}

#salesChart.dashboard-revenue-chart .chart-y-tick,
#salesChart.dashboard-revenue-chart .chart-y-axis-title {
  display: block;
}

#salesChart.dashboard-revenue-chart .chart-x-axis-title {
  display: none;
}

#salesChart.dashboard-revenue-chart .chart-y-tick,
#salesChart.dashboard-revenue-chart .chart-y-axis-title,
#salesChart.dashboard-revenue-chart .chart-x-tick {
  fill: #8a918b;
}

#salesChart.dashboard-revenue-chart .chart-x-tick {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

#salesChart.dashboard-revenue-chart .chart-y-tick {
  font-size: 12px;
  font-weight: 700;
}

#salesChart.dashboard-revenue-chart .chart-y-axis-title {
  font-size: 11px;
  font-weight: 700;
}

#salesChart.dashboard-revenue-chart .chart-point-dot {
  fill: #179883;
  opacity: 0;
  stroke-width: 0;
}

#salesChart.dashboard-revenue-chart .chart-point.is-clickable:hover .chart-point-dot,
#salesChart.dashboard-revenue-chart .chart-point.is-clickable:focus .chart-point-dot {
  fill: #179883;
  opacity: 1;
  stroke: #179883;
  stroke-width: 0;
}

#salesChart.dashboard-revenue-chart .chart-point-tooltip {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

#salesChart.dashboard-revenue-chart .chart-point-tooltip rect {
  fill: rgba(255, 255, 255, 0.96);
  stroke: rgba(209, 215, 206, 0.8);
  stroke-width: 1;
  filter: drop-shadow(0 5px 12px rgba(23, 32, 27, 0.12));
}

#salesChart.dashboard-revenue-chart .chart-point-tooltip text {
  fill: #5b625d;
  font-size: 12px;
  font-weight: 500;
}

#salesChart.dashboard-revenue-chart .chart-point.is-clickable:hover .chart-point-tooltip,
#salesChart.dashboard-revenue-chart .chart-point.is-clickable:focus .chart-point-tooltip {
  opacity: 1;
}

.queue,
.feed,
.insights,
.activity-log,
.stack,
.data-list,
.delivery-list,
.booking-list,
.order-items {
  display: grid;
  gap: 10px;
}

.row,
.queue-item,
.insight,
.activity-item,
.order-line,
.table-card,
.finance-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
}

.activity-panel {
  grid-column: span 2;
}

.activity-item {
  display: grid;
  grid-template-columns: 86px 1fr auto;
  align-items: center;
  gap: 12px;
}

.activity-item time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.activity-item strong,
.activity-item small {
  display: block;
}

.activity-item small {
  color: var(--muted);
  margin-top: 3px;
}

.activity-action {
  border-radius: 999px;
  background: #edf4ef;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  padding: 5px 8px;
  white-space: nowrap;
}

button.row {
  min-height: auto;
}

.row strong,
.queue-item strong {
  display: block;
}

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

.queue-item[data-status="late"] {
  border-color: #e8b5ad;
  background: #fff7f5;
}

.queue-item[data-status="new"] {
  border-color: #cdd9f0;
  background: #f4f7fd;
}

.queue-item[data-status="cooking"] {
  border-color: #efdca8;
  background: #fffaf0;
}

.queue-item[data-status="ready"] {
  border-color: #b8dccd;
  background: #f2faf6;
}

.insight {
  border-left: 4px solid var(--accent);
}

.pos-layout,
.crm-layout,
.floor-layout,
.content-grid {
  display: grid;
  grid-template-columns: minmax(460px, 1fr) 360px;
  min-width: 0;
  gap: 16px;
}

.pos-layout {
  grid-template-columns: minmax(340px, 380px) minmax(520px, 1fr);
  align-items: start;
}

.pos-command-bar {
  display: grid;
  grid-template-columns: minmax(190px, 0.7fr) minmax(300px, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
}

.pos-command-bar strong {
  display: block;
  margin-top: 5px;
}

.pos-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(100px, 1fr));
  gap: 8px;
}

.pos-status,
.pos-command-actions button {
  min-height: 44px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 2px;
  border: 1px solid #cfe3db;
  border-radius: 7px;
  color: #0c5449;
  background: #e8f3ef;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.pos-status strong,
.pos-status small {
  display: block;
  line-height: 1.12;
}

.pos-status small {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: #3f6f63;
  font-size: 11px;
  font-weight: 700;
}

button.pos-status {
  cursor: pointer;
}

.pos-status.warn {
  border-color: #efc7c1;
  color: #8f2f25;
  background: #fff1ef;
}

.pos-status.ready {
  border-color: #b8ded1;
  color: #0a5b4f;
  background: #ecf8f3;
}

.pos-checks-panel {
  display: none;
  margin: 0;
}

.pos-checks-panel.show {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.pos-checks-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.65fr) minmax(320px, 1fr);
  gap: 12px;
}

.pos-checks-list {
  display: grid;
  gap: 4px;
  max-height: 320px;
  overflow: auto;
}

.pos-checks-list button,
.pos-check-detail-line {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
}

.pos-checks-list button {
  min-height: 52px;
  padding: 8px 10px;
  text-align: left;
  background: #fff;
}

.pos-checks-list button.active {
  border-color: #b8dccd;
  background: #e8f3ef;
}

.pos-checks-list strong,
.pos-checks-list small,
.pos-check-detail-line strong,
.pos-check-detail-line small {
  display: block;
}

.pos-checks-list small,
.pos-check-detail-line small,
.pos-check-meta {
  color: var(--muted);
}

.pos-check-detail {
  display: grid;
  gap: 10px;
  align-content: start;
}

.pos-check-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  gap: 8px;
  font-size: 12px;
}

.pos-check-meta div {
  display: grid;
  gap: 3px;
  min-height: 48px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8faf7;
}

.pos-check-meta small {
  color: var(--muted);
  font-weight: 700;
}

.pos-check-meta strong {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
}

.pos-check-detail-lines {
  display: grid;
  gap: 6px;
}

.pos-check-detail-line {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

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

.pos-check-actions button,
.pos-check-actions .badge {
  min-height: 38px;
}

.pos-checks-window-backdrop {
  z-index: 46;
  place-items: stretch;
  padding: 8px;
}

.function-window.pos-checks-window {
  width: min(1480px, calc(100vw - 16px));
  height: min(780px, calc(100vh - 16px));
  max-height: calc(100vh - 16px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 8px;
}

body.android-asset-app .function-window.pos-checks-window {
  height: min(780px, calc(100vh - 16px - var(--app-bottom-safe)));
  max-height: calc(100vh - 16px - var(--app-bottom-safe));
}

.pos-checks-window .function-window-head {
  flex: 0 0 auto;
  min-height: 64px;
  padding: 12px 16px;
}

.pos-checks-window .function-window-head h2 {
  margin: 4px 0 0;
}

.pos-checks-window .function-window-head small {
  color: var(--muted);
  font-weight: 800;
}

.pos-checks-window-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pos-checks-window-head-actions > button:not(.icon-close) {
  min-height: 38px;
  padding: 0 12px;
}

.pos-checks-toolbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #f8faf7;
}

.pos-check-period-controls {
  display: grid;
  grid-template-columns: 132px 158px;
  gap: 8px;
  min-width: 0;
}

.pos-check-period-controls label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.pos-check-period-controls label.muted {
  opacity: 0.58;
}

.pos-check-period-controls select,
.pos-check-period-controls input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 10px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-weight: 800;
}

.pos-check-search {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.pos-check-search input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-weight: 700;
}

.pos-checks-list.compact {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  gap: 0;
  align-content: start;
  grid-auto-rows: min-content;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 28px 12px 10px;
}

body.android-asset-app .pos-checks-list.compact {
  padding-bottom: calc(12px + var(--app-bottom-safe));
  scroll-padding-bottom: calc(18px + var(--app-bottom-safe));
}

.pos-check-list-head,
.pos-checks-list.compact .pos-check-compact-row {
  display: grid;
  grid-template-columns: minmax(78px, 0.55fr) minmax(50px, 0.35fr) minmax(118px, 1.05fr) minmax(96px, 0.72fr) minmax(88px, 0.62fr) minmax(84px, 0.62fr) 112px;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.pos-check-list-head {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 28px;
  padding: 0 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  background: rgba(249, 252, 247, 0.98);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.pos-checks-list.compact .pos-check-compact-row {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 0;
  border-width: 0 0 1px;
  border-color: var(--line);
  text-align: left;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
}

.pos-checks-list.compact .pos-check-compact-row:hover,
.pos-checks-list.compact .pos-check-compact-row.active {
  background: #edf7f2;
}

.pos-check-list-head span,
.pos-checks-list.compact .pos-check-compact-row .pos-check-cell,
.pos-checks-list.compact .pos-check-compact-row .pos-check-row-amount {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pos-check-row-no {
  color: var(--ink);
  font-weight: 950;
}

.pos-check-row-time,
.pos-check-row-source,
.pos-check-row-fiscal {
  color: var(--muted);
}

.pos-checks-list.compact .pos-check-compact-row .pos-check-row-amount {
  width: 100%;
  min-width: 0;
  justify-self: stretch;
  text-align: right;
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
}

.pos-check-list-head span:last-child {
  text-align: right;
}

.pos-check-detail-view {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 10px;
  overflow: auto;
  padding: 12px 16px 16px;
}

.pos-check-detail-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.pos-check-detail-toolbar > div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.function-window .pos-check-detail-head {
  display: flex;
}

.pos-check-detail-head h2 {
  margin: 0;
}

.pos-check-detail-head small {
  color: var(--muted);
  font-weight: 800;
}

.receipt-channel-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #fff;
  font-size: 11px;
  font-weight: 900;
}

.receipt-channel-pill.sent,
.receipt-channel-pill.online,
.receipt-channel-pill.archive,
.receipt-channel-pill.print {
  border-color: #b8dccd;
  color: #0a5b4f;
  background: #edf8f3;
}

.receipt-channel-pill.queue {
  border-color: #e7d39a;
  color: #7a5b00;
  background: #fff8df;
}

.pos-refund-box {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #edc4bf;
  border-radius: 8px;
  background: #fff7f6;
}

.pos-refund-box h3 {
  margin: 0;
  font-size: 15px;
}

.pos-refund-box p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.pos-refund-box label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.pos-refund-box textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

.pos-refund-summary {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 7px;
  background: #fff;
  font-weight: 800;
}

.pos-refund-result {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid #edd6a6;
  border-radius: 8px;
  background: #fff8e7;
}

.pos-refund-result div {
  display: grid;
  gap: 2px;
}

.pos-refund-result small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.pos-refund-result strong {
  font-size: 13px;
}

.pos-command-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(104px, 1fr));
  gap: 8px;
}

.pos-command-actions button {
  padding: 0 12px;
}

.pos-functions-panel {
  display: none;
  margin-bottom: 14px;
}

.pos-functions-panel.show {
  display: block;
}

#pos.pos-functions-mode .pos-home,
#pos.pos-functions-mode .pos-layout,
#pos.pos-functions-mode .pos-checks-panel,
#pos.pos-functions-mode #posTableStrip,
#pos.pos-functions-mode #posTableWindowHost {
  display: none !important;
}

#pos.pos-home-mode .pos-layout,
#pos.pos-home-mode #posTableStrip,
#pos.pos-home-mode #posDeliveryAddressPanel,
#pos.pos-home-mode #posTableWindowHost {
  display: none !important;
}

#pos.pos-check-open-mode .pos-home {
  display: none !important;
}

#pos.pos-check-open-mode .pos-layout {
  min-height: calc(100vh - 118px);
  margin-bottom: 0;
}

#pos.pos-check-open-mode .order-panel,
#pos.pos-check-open-mode .menu-browser {
  height: calc(100vh - 118px);
  overflow: auto;
}

#pos.pos-check-open-mode .receipt-preview {
  max-height: 160px;
}

#pos.pos-home-mode.pos-home-tables-off .pos-home,
#pos.pos-home-mode.pos-home-checks-off .pos-home,
.pos-home.pos-home-simple {
  grid-template-columns: minmax(220px, 0.42fr) minmax(360px, 1fr);
}

#pos.pos-home-mode.pos-home-tables-off.pos-home-checks-off .pos-home,
.pos-home.pos-home-simple:has(.pos-home-tables.hidden):has(.pos-home-checks.hidden) {
  grid-template-columns: minmax(260px, 520px);
}

#pos.pos-home-mode.pos-home-tables-off .pos-home-tables,
#pos.pos-home-mode.pos-home-checks-off .pos-home-checks {
  display: none !important;
}

#pos.pos-functions-mode .pos-functions-panel {
  min-height: calc(100vh - 190px);
  margin-bottom: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

#pos.pos-functions-mode .pos-command-bar {
  margin-bottom: 10px;
}

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

.pos-functions-grid h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.pos-function-list {
  display: grid;
  gap: 6px;
}

.pos-function-list button {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 8px 10px;
  text-align: left;
  background: #fff;
}

.pos-function-list button.active {
  border-color: var(--accent);
  background: var(--green-soft);
}

.function-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 7px;
  color: #fff;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.function-icon.yellow {
  background: #c8a229;
}

.function-icon.orange {
  background: #c86f2d;
}

.function-icon.green {
  background: var(--accent);
}

.function-icon.red {
  background: #b7433f;
}

.function-icon.cyan {
  background: #2798ad;
}

.function-icon.violet {
  background: #7e63d7;
}

.function-icon.blue {
  background: #234cbb;
}

.function-icon.gray {
  background: #6d7a80;
}

.pos-function-list strong,
.pos-function-list small {
  display: block;
}

body.view-pos #pos.pos-functions-mode .pos-functions-panel,
body.surface-pos #pos.pos-functions-mode .pos-functions-panel {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  padding-bottom: max(96px, calc(48px + env(safe-area-inset-bottom, 0px)));
  scroll-padding-bottom: max(116px, calc(68px + env(safe-area-inset-bottom, 0px)));
}

body.android-asset-app.view-pos #pos.pos-functions-mode .pos-functions-panel,
body.android-asset-app.surface-pos #pos.pos-functions-mode .pos-functions-panel {
  padding-bottom: calc(112px + var(--app-bottom-safe));
  scroll-padding-bottom: calc(132px + var(--app-bottom-safe));
}

body.view-pos #pos.pos-functions-mode .pos-functions-grid,
body.surface-pos #pos.pos-functions-mode .pos-functions-grid {
  gap: 10px;
}

body.view-pos #pos.pos-functions-mode .pos-functions-grid h3,
body.surface-pos #pos.pos-functions-mode .pos-functions-grid h3 {
  margin-bottom: 6px;
}

body.view-pos #pos.pos-functions-mode .pos-function-list,
body.surface-pos #pos.pos-functions-mode .pos-function-list {
  gap: 5px;
}

body.view-pos #pos.pos-functions-mode .pos-function-list button,
body.surface-pos #pos.pos-functions-mode .pos-function-list button {
  grid-template-columns: 38px minmax(0, 1fr) auto;
  min-height: 48px;
  padding: 6px 10px;
}

body.view-pos #pos.pos-functions-mode .function-icon,
body.surface-pos #pos.pos-functions-mode .function-icon {
  width: 34px;
  height: 34px;
}

.pos-function-list small {
  color: var(--muted);
  margin-top: 3px;
}

.pos-function-detail {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.pos-function-detail p {
  margin: 0 0 12px;
  color: var(--muted);
}

.function-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f8f4;
}

.function-stats.three {
  grid-template-columns: repeat(3, 1fr);
}

.function-stats strong {
  font-size: 20px;
}

.function-stats small,
.function-note {
  color: var(--muted);
}

.function-note {
  margin: 10px 0;
  line-height: 1.4;
}

.function-device-list {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

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

.printer-settings-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.printer-settings-grid input,
.printer-settings-grid select {
  min-width: 0;
}

.printer-settings-grid .checkbox-line {
  grid-template-columns: auto 1fr;
  align-items: center;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fbfcfa;
}

.printer-settings-grid .checkbox-line input {
  width: 20px;
  height: 20px;
}

.warn-text {
  color: var(--red);
  font-weight: 800;
}

.function-window-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(20, 30, 24, 0.42);
}

body.android-asset-app .function-window-backdrop {
  padding-bottom: calc(24px + var(--app-bottom-safe));
}

.function-window {
  width: min(760px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(20, 30, 24, 0.28);
}

.workspace-window-backdrop {
  left: 232px;
  place-items: stretch;
  padding: 14px;
  background: rgba(20, 30, 24, 0.34);
}

.workspace-window-backdrop .function-window {
  width: 100%;
  min-width: 0;
  max-width: none;
  height: 100%;
  max-height: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 8px;
}

.workspace-window-backdrop .function-window-head {
  min-height: 58px;
  padding: 8px 14px;
}

.workspace-window-backdrop .function-window-head > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 10px;
  align-items: center;
}

.workspace-window-backdrop .function-window-head .badge {
  padding: 3px 9px;
  font-size: 12px;
  grid-row: span 2;
}

.workspace-window-backdrop .function-window-head h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.15;
}

.workspace-window-backdrop .function-window-head small {
  display: block;
  margin-top: 1px;
  font-size: 12px;
}

.workspace-window-backdrop .icon-close {
  width: 38px;
  height: 38px;
  font-size: 24px;
}

.workspace-window-backdrop .function-window > .module-table-wrap,
.workspace-window-backdrop .function-window > .stock-transfer-table {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  max-width: 100%;
  overflow: auto;
}

.workspace-window-backdrop .function-window > .inventory-create-panel,
.workspace-window-backdrop .function-window > .inventory-window-actions,
.workspace-window-backdrop .function-window > .filter-bar,
.workspace-window-backdrop .function-window > .stock-transfer-route,
.workspace-window-backdrop .function-window > .supply-total-panel {
  flex: 0 0 auto;
}

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

.marketing-campaign-window {
  gap: 12px;
}

.campaign-editor-grid {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 12px;
  padding: 14px;
  border-top: 1px solid var(--line);
}

.campaign-editor-grid label {
  display: grid;
  align-content: start;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
}

.campaign-editor-grid label.wide {
  grid-column: span 2;
}

.campaign-editor-grid input,
.campaign-editor-grid select,
.campaign-editor-grid textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-weight: 700;
}

.campaign-editor-grid textarea {
  resize: vertical;
  font-weight: 600;
  line-height: 1.35;
}

.campaign-editor-preview {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) repeat(2, minmax(180px, 0.35fr));
  gap: 10px;
  margin: 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f8f4;
}

.campaign-editor-preview > div {
  display: grid;
  gap: 4px;
}

.campaign-editor-preview strong {
  font-size: 18px;
}

.campaign-editor-preview small {
  color: var(--muted);
  font-weight: 700;
}

.campaign-editor-actions {
  flex: 0 0 auto;
}

.danger-button {
  color: #842016;
  border-color: #efd0c9;
  background: #fff6f4;
}

.function-window-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.function-window-head h2 {
  margin: 8px 0 0;
}

.function-window .pos-function-detail {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.function-window .panel-head.subhead {
  display: none;
}

.function-window .panel-head.subhead.pos-check-detail-head {
  display: flex;
}

.icon-close {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
}

.recipe-window {
  width: min(1080px, calc(100vw - 48px));
}

.compact-editor-window {
  width: min(720px, calc(100vw - 32px));
}

.compact-editor-window .recipe-editor-main {
  margin: 12px;
}

.compact-editor-window .recipe-editor-grid {
  grid-template-columns: repeat(2, minmax(180px, 1fr));
}

.ingredient-create-window {
  width: min(980px, calc(100vw - 40px));
  max-height: calc(100vh - 24px);
}

.ingredient-create-head {
  justify-content: flex-start;
  gap: 10px;
  min-height: 48px;
  padding: 8px 16px;
}

.ingredient-create-head h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
}

.ingredient-create-body {
  display: grid;
  gap: 10px;
  padding: 12px 20px 0;
}

.ingredient-create-row {
  display: grid;
  grid-template-columns: minmax(120px, 190px) minmax(180px, 560px);
  gap: 10px;
  align-items: center;
  min-width: 0;
  color: #303436;
  font-size: 13px;
  line-height: 1.2;
}

.ingredient-create-row > span {
  min-width: 0;
}

.ingredient-create-row input,
.ingredient-create-row select {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  border: 1px solid #cfd4d7;
  border-radius: 5px;
  padding: 0 10px;
  color: #303436;
  background: #fff;
  font: inherit;
  font-weight: 700;
}

.ingredient-create-short select,
.ingredient-create-money > .recipe-money-input,
.ingredient-create-percent > .recipe-money-input {
  max-width: 190px;
}

.ingredient-extra {
  display: grid;
  gap: 8px;
}

.ingredient-extra summary {
  color: #3488d1;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
}

.ingredient-extra-grid {
  display: grid;
  gap: 9px;
  padding-top: 8px;
}

.ingredient-stock-accounting {
  display: grid;
  gap: 10px;
  margin: 12px -20px 0;
  padding: 14px 20px;
  border-top: 1px solid #e3e8e5;
}

.ingredient-stock-accounting h3 {
  margin: 0;
  color: #303436;
  font-size: 18px;
  line-height: 1.2;
}

.ingredient-stock-accounting p {
  max-width: 720px;
  margin: 0 0 4px;
  color: #3d4143;
  font-size: 13px;
  line-height: 1.35;
}

.ingredient-create-actions {
  margin: 0;
  padding: 12px 20px 14px;
  border-top: 1px solid #e3e8e5;
}

.ingredient-create-actions .primary {
  min-width: 118px;
  min-height: 38px;
  font-size: 15px;
}

.recipe-page-window {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  border-radius: 0;
  background: #fff;
}

.recipe-workspace-backdrop {
  left: 0;
  z-index: 90;
  padding: 0;
  background: #fff;
}

.recipe-workspace-backdrop .recipe-page-window {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.recipe-page-head {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 18px;
  border-bottom: 1px solid #e3e6e8;
  background: #fff;
}

.recipe-page-head h2 {
  margin: 0;
  color: #2f3335;
  font-size: 19px;
  line-height: 1.1;
}

.recipe-back-button {
  width: 28px;
  height: 28px;
  border: 0;
  color: #3488d1;
  background: transparent;
  font-size: 28px;
  line-height: 1;
}

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

.recipe-mobile-menu {
  position: relative;
  display: none;
}

.recipe-mobile-menu summary {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border: 1px solid #cddfd6;
  border-radius: 8px;
  padding: 0 12px;
  color: #146b5d;
  background: #e3f1eb;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.recipe-mobile-menu summary::-webkit-details-marker {
  display: none;
}

.recipe-mobile-menu nav {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  right: 0;
  display: grid;
  gap: 4px;
  width: min(260px, calc(100vw - 24px));
  border: 1px solid #dfe5e2;
  border-radius: 8px;
  padding: 8px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(26, 42, 34, 0.16);
}

.recipe-mobile-menu a {
  display: flex;
  align-items: center;
  min-height: 34px;
  border-radius: 7px;
  padding: 0 10px;
  color: #3488d1;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.recipe-mobile-menu a:hover {
  color: #0f6f60;
  background: #edf5f1;
}

.recipe-editor-shell,
.editor-window-shell {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 214px minmax(0, 1fr);
  background: #fff;
}

.editor-window-shell {
  grid-template-columns: 176px minmax(0, 1fr);
}

.editor-side-nav {
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 10px;
  border-right: 1px solid #e2e6e4;
  padding: 12px 10px;
  background: #f6f8f7;
  overflow: auto;
}

.editor-app-sidebar {
  display: block;
}

.editor-app-sidebar .editor-brand-block {
  margin-bottom: 16px;
  border-bottom: 0;
  padding: 0;
}

.editor-app-sidebar .nav-tree {
  gap: 10px;
}

.editor-app-sidebar .nav-group {
  gap: 0;
}

.editor-app-sidebar .nav-parent,
.editor-app-sidebar .nav {
  font-family: inherit;
}

.editor-app-sidebar .nav-parent {
  min-height: 26px;
}

.editor-app-sidebar .nav {
  border-radius: 7px;
  padding-left: 16px;
}

.editor-side-nav-compact {
  padding: 14px 12px;
}

.editor-window-shell .recipe-editor {
  padding: 16px;
}

.editor-side-brand {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  column-gap: 8px;
  align-items: center;
  min-width: 0;
}

.editor-side-brand span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  color: #fff;
  background: #0f1c16;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0;
}

.editor-side-brand strong {
  overflow: hidden;
  color: #1f2a25;
  font-size: 13px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-side-brand small {
  overflow: hidden;
  color: #6e7a74;
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-side-nav:not(.editor-app-sidebar) nav,
.editor-main-nav,
.editor-nav-group {
  display: grid;
  align-content: start;
  gap: 2px;
}

.editor-side-nav:not(.editor-app-sidebar) a,
.editor-side-nav:not(.editor-app-sidebar) button,
.editor-side-nav:not(.editor-app-sidebar) strong {
  display: flex;
  align-items: center;
  min-height: 28px;
  border: 0;
  border-radius: 7px;
  padding: 0 8px;
  color: #40504a;
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  text-align: left;
}

.editor-side-nav:not(.editor-app-sidebar) button {
  width: 100%;
}

.editor-side-nav:not(.editor-app-sidebar) a:hover,
.editor-side-nav:not(.editor-app-sidebar) button:hover {
  color: #146b5d;
  background: #edf5f1;
}

.editor-side-nav:not(.editor-app-sidebar) a.active {
  color: #0f6f60;
  background: #e3f1eb;
}

.editor-nav-group {
  margin: 2px 0;
}

.editor-nav-group strong {
  color: #202b25;
}

.editor-nav-group a {
  padding-left: 24px;
  color: #3488d1;
  font-weight: 750;
}

.editor-side-summary {
  display: grid;
  gap: 3px;
  border: 1px solid #dae5df;
  border-radius: 7px;
  padding: 8px;
  background: #fff;
}

.editor-side-summary span,
.editor-side-summary small {
  overflow: hidden;
  color: #758079;
  font-size: 9px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-side-summary strong {
  overflow: hidden;
  color: #17231e;
  font-size: 15px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recipe-editor {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 0;
  padding: 14px 18px 32px;
  overflow: auto;
  background: #fff;
}

.recipe-editor-serviceos {
  width: min(1040px, 100%);
}

.recipe-editor-main {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 11px;
  background: #fff;
}

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

.recipe-dashboard > div,
.recipe-dashboard > button,
.recipe-control-stat {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid #d8e5dd;
  border-radius: 8px;
  padding: 12px;
  background: #fbfdfb;
}

.recipe-dashboard > button {
  min-height: 96px;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.recipe-dashboard > button:hover {
  border-color: #8bc8b0;
  background: #f2faf6;
}

.recipe-dashboard > button.active {
  border-color: #19856f;
  box-shadow: inset 0 0 0 1px #19856f;
}

.recipe-dashboard > button.danger.active {
  border-color: #c04b3f;
  box-shadow: inset 0 0 0 1px #c04b3f;
}

.recipe-dashboard span,
.recipe-dashboard small,
.recipe-control-stat span,
.recipe-control-stat small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recipe-dashboard strong,
.recipe-control-stat strong {
  overflow: hidden;
  font-size: 24px;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recipe-ops-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid #cfe0d6;
  border-radius: 8px;
  padding: 14px;
  background: #f7fbf8;
}

.recipe-ops-panel h3 {
  margin: 0 0 4px;
}

.recipe-ops-panel p {
  max-width: 760px;
  color: var(--muted);
  font-weight: 700;
}

.recipe-control-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  background: #f7fbf8;
}

.recipe-form-card {
  width: 100%;
  max-width: 1280px;
  box-sizing: border-box;
  border: 1px solid #e3e8e5;
  border-radius: 7px;
  padding: 13px;
  background: #fff;
}

.recipe-form-grid {
  display: grid;
  gap: 11px;
}

.recipe-form-row {
  display: grid;
  grid-template-columns: minmax(112px, 160px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  min-width: 0;
}

.recipe-form-row > * {
  min-width: 0;
}

.recipe-form-row > span {
  padding-top: 7px;
  color: #2d3133;
  font-size: 11px;
  font-weight: 800;
}

.recipe-form-row input,
.recipe-form-row select {
  width: 100%;
  min-height: 31px;
  border: 1px solid #cfd4d7;
  border-radius: 5px;
  padding: 0 10px;
  color: #303436;
  background: #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
}

.recipe-form-row small {
  display: block;
  margin-top: 5px;
  color: #8d8f92;
  font-size: 10px;
  line-height: 1.35;
  font-weight: 700;
}

.recipe-form-row .recipe-tax-warning {
  color: #e26216;
}

.recipe-code-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 10px;
}

.recipe-code-line small {
  grid-column: 1 / -1;
}

.recipe-code-line button {
  border: 0;
  color: #3488d1;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
}

.recipe-cover-line .image-upload-field {
  width: 100%;
  max-width: 720px;
}

.recipe-cover-line .image-upload-preview {
  width: 150px;
  height: 150px;
  min-height: 150px;
  aspect-ratio: 1;
}

.recipe-cover-line .image-preview,
.recipe-cover-placeholder {
  width: 100px;
  height: 100px;
  aspect-ratio: 1;
  border-radius: 5px;
  background: #aaa;
}

.recipe-cover-placeholder img,
.recipe-cover-line .image-preview img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.recipe-checks {
  display: grid;
  gap: 6px;
  padding-top: 2px;
}

.recipe-checks label {
  display: inline-grid;
  grid-template-columns: 16px minmax(0, max-content);
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: #3c4042;
  font-size: 11px;
  font-weight: 700;
}

.recipe-checks input {
  width: 16px !important;
  min-width: 16px;
  height: 16px;
  min-height: 16px !important;
  margin: 0;
  padding: 0;
}

.recipe-price-line {
  display: grid;
  grid-template-columns: minmax(112px, 1fr) minmax(88px, 0.75fr) minmax(114px, 0.85fr);
  gap: 14px;
  align-items: end;
  min-width: 0;
}

.product-price-stack {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.product-price-line {
  grid-template-columns: minmax(160px, 1.4fr) minmax(104px, 0.8fr) minmax(82px, 0.55fr) minmax(106px, 0.7fr);
}

.product-barcode-field {
  display: grid;
  gap: 4px;
  color: #666;
  font-size: 10px;
  font-weight: 800;
}

.recipe-money-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
}

.recipe-money-input input {
  border-radius: 4px 0 0 4px;
}

.recipe-money-input b {
  display: grid;
  place-items: center;
  min-height: 31px;
  border: 1px solid #cfd4d7;
  border-left: 0;
  border-radius: 0 4px 4px 0;
  color: #4a4d4f;
  background: #f1f2f3;
}

.recipe-price-stat {
  display: grid;
  gap: 3px;
}

.recipe-price-stat span {
  color: #8b8d90;
  font-size: 10px;
  font-weight: 800;
}

.recipe-price-stat strong {
  color: #333;
  font-size: 13px;
}

.recipe-additional {
  color: #3488d1;
  font-size: 11px;
  font-weight: 800;
}

.recipe-additional summary {
  cursor: pointer;
}

.recipe-additional .recipe-control-panel {
  margin-top: 12px;
}

.recipe-section-head {
  margin-bottom: 11px;
}

.recipe-section-head h2 {
  margin: 0;
  color: #111;
  font-size: 16px;
  line-height: 1.1;
}

.recipe-section-head p {
  margin: 4px 0 0;
  color: #8d8f92;
  font-size: 10px;
  font-weight: 700;
}

.recipe-empty-card {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 128px;
  border-radius: 10px;
  padding: 22px 28px;
  background: #f4f4f4;
}

.recipe-empty-card strong {
  display: block;
  margin-bottom: 8px;
  color: #34383a;
  font-size: 16px;
}

.recipe-empty-card p {
  max-width: 980px;
  margin: 0 0 18px;
  color: #55595b;
  font-size: 14px;
  line-height: 1.35;
}

.recipe-empty-icon {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  color: #bcbec0;
  font-size: 42px;
}

.primary-outline {
  min-height: 31px;
  border: 2px solid #3488d1;
  border-radius: 7px;
  padding: 0 13px;
  color: #3488d1;
  background: #fff;
  font-size: 11px;
  font-weight: 900;
}

.recipe-section-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.recipe-editor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 10px;
  align-items: end;
}

.recipe-editor label,
.recipe-part-row label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.recipe-editor input,
.recipe-editor select,
.recipe-part-row input,
.recipe-part-row select {
  width: 100%;
  min-height: 29px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0 8px;
  color: var(--ink);
  background: #fff;
  font-size: 11px;
  font-weight: 700;
}

.recipe-metric {
  display: grid;
  gap: 4px;
  min-height: 46px;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 6px 8px;
  background: #f6f8f4;
}

.recipe-metric span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.recipe-metric strong {
  font-size: 18px;
}

.recipe-editor-actions {
  margin-top: 10px;
  justify-content: flex-start;
}

.recipe-parts {
  display: grid;
  gap: 6px;
}

.recipe-stock-preview {
  display: grid;
  gap: 6px;
}

.recipe-stock-preview-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(120px, 0.5fr);
  align-items: center;
  gap: 8px;
  border: 1px solid #e2e9e4;
  border-radius: 7px;
  padding: 7px 8px;
  background: #fff;
}

.recipe-stock-preview-row strong,
.recipe-stock-preview-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recipe-stock-preview-row small {
  color: var(--muted);
  font-weight: 700;
}

.supplier-order-window {
  display: grid;
  gap: 12px;
  padding: 16px;
}

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

.supplier-contact-card div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #f8faf7;
}

.supplier-contact-card small,
.supplier-contact-card strong {
  display: block;
}

.supplier-contact-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.supplier-contact-card strong {
  margin-top: 3px;
}

.supplier-ledger-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 10px;
}

.supplier-ledger-summary div {
  min-height: 70px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.supplier-ledger-summary small,
.supplier-ledger-summary strong {
  display: block;
}

.supplier-ledger-summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.supplier-ledger-summary strong {
  margin-top: 5px;
  font-size: 18px;
}

.supplier-reorder-list,
.supplier-assortment-list,
.supplier-payment-list {
  display: grid;
  gap: 8px;
}

.supplier-reorder-row,
.supplier-assortment-row {
  display: grid;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
}

.supplier-reorder-row {
  grid-template-columns: minmax(220px, 1fr) auto 70px;
}

.supplier-reorder-row.focus {
  border-color: #d9b571;
  background: #fff9eb;
}

.supplier-reorder-row strong,
.supplier-reorder-row small {
  display: block;
}

.supplier-reorder-row small {
  margin-top: 2px;
  color: var(--muted);
}

.supplier-reorder-row span {
  border-radius: 999px;
  padding: 5px 9px;
  color: #7d2119;
  background: #f4d8d5;
  font-size: 12px;
  font-weight: 900;
}

.supplier-reorder-row b {
  text-align: right;
}

.supplier-assortment-row {
  grid-template-columns: minmax(170px, 1fr) 120px 130px 100px;
  font-size: 13px;
}

.supplier-history-table {
  min-width: 1180px;
}

.supplier-history-table small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.supplier-pay-inline {
  display: grid;
  grid-template-columns: minmax(86px, 0.8fr) minmax(130px, 1fr) auto;
  gap: 6px;
  align-items: center;
  min-width: 310px;
}

.supplier-pay-inline input,
.supplier-pay-inline select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 8px;
  background: #fff;
}

.supplier-payment-row {
  display: grid;
  grid-template-columns: minmax(170px, 0.8fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.supplier-payment-row strong,
.supplier-payment-row small {
  display: block;
}

.supplier-payment-row small {
  margin-top: 2px;
  color: var(--muted);
}

.supplier-payment-row span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tenant-create-panel {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #cfe2d9;
  border-radius: 8px;
  background: #f8fcf9;
}

.tenant-create-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.tenant-create-head strong,
.tenant-create-head small,
.tenant-create-access small,
.tenant-create-access strong {
  display: block;
}

.tenant-create-head small,
.tenant-create-access small {
  color: var(--muted);
  font-weight: 800;
}

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

.tenant-create-grid label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.tenant-create-grid .wide {
  grid-column: span 2;
}

.tenant-create-access {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.tenant-create-access div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.tenant-create-access strong {
  min-width: 0;
  overflow: hidden;
  color: var(--accent);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stock-reorder-button {
  border: 0;
  cursor: pointer;
}

.stock-balance-button {
  border: 0;
  cursor: pointer;
}

.stock-balance-window {
  display: grid;
  gap: 12px;
  padding: 16px;
}

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

.stock-balance-summary div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #f8faf7;
}

.stock-balance-summary small,
.stock-balance-summary strong {
  display: block;
}

.stock-balance-summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.stock-balance-summary strong {
  margin-top: 3px;
}

.stock-balance-list {
  display: grid;
  gap: 8px;
}

.stock-balance-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
}

.stock-balance-row strong,
.stock-balance-row small {
  display: block;
}

.stock-balance-row small {
  margin-top: 2px;
  color: var(--muted);
}

.stock-balance-row span {
  font-weight: 900;
}

@media (max-width: 900px) {
  .supplier-contact-card,
  .supplier-ledger-summary,
  .supplier-reorder-row,
  .supplier-assortment-row,
  .supplier-payment-row,
  .supplier-pay-inline,
  .tenant-create-grid,
  .tenant-create-access,
  .stock-balance-summary,
  .stock-balance-row {
    grid-template-columns: 1fr;
  }

  .tenant-create-grid .wide {
    grid-column: auto;
  }
}

.recipe-part-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 96px 58px 92px auto;
  gap: 8px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fbfcfa;
}

.recipe-unit-pill,
.recipe-line-cost {
  display: grid;
  gap: 2px;
  min-height: 31px;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 4px 7px;
  background: #eef6f1;
}

.recipe-unit-pill span,
.recipe-line-cost span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
}

.recipe-unit-pill strong,
.recipe-line-cost strong {
  color: #0c5449;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
}

.recipe-line-cost {
  background: #fff;
}

.recipe-line-cost strong {
  color: var(--ink);
}

.modifier-editor-row {
  grid-template-columns: minmax(170px, 1fr) 92px minmax(160px, 0.9fr) 92px auto;
}

.product-modification-actions {
  grid-template-columns: auto;
  justify-content: start;
}

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

.product-mod-mode {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  border: 1px solid #edf0ee;
  border-radius: 7px;
  padding: 12px;
  background: #f8f8f8;
}

.product-mod-mode input[type="radio"] {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
}

.product-mod-mode-title {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
}

.product-mod-mode span {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  color: #303436;
}

.product-mod-mode strong {
  font-size: 15px;
  font-weight: 900;
}

.product-mod-mode small {
  color: #8d8f92;
  font-size: 12px;
  font-weight: 750;
}

.product-mod-mode-expanded {
  grid-template-columns: 18px minmax(0, 1fr);
}

.product-modification-list,
.product-mod-add-link {
  grid-column: 1 / -1;
  margin-left: 27px;
}

.product-modification-list {
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.product-modification-row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 9px;
  align-items: end;
  min-width: 0;
  max-width: 100%;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

.product-modification-row > * {
  min-width: 0;
}

.product-modification-row.readonly-row {
  grid-template-columns: minmax(180px, 1fr) auto auto;
  align-items: center;
}

.product-modification-row label {
  display: grid;
  gap: 4px;
  color: #303436;
  font-size: 12px;
  font-weight: 750;
}

.product-modification-row .product-mod-name {
  grid-column: 1 / -1;
}

.product-modification-row label:nth-of-type(2) {
  grid-column: 1 / span 5;
}

.product-modification-row label:nth-of-type(3) {
  grid-column: 6 / span 3;
}

.product-modification-row label:nth-of-type(4) {
  grid-column: 1 / span 2;
}

.product-modification-row label:nth-of-type(5) {
  grid-column: 4 / span 2;
}

.product-modification-row label:nth-of-type(6) {
  grid-column: 7 / span 2;
}

.product-modification-row label:nth-of-type(7) {
  grid-column: 9 / span 2;
}

.product-uktzed-search {
  grid-column: 9 / span 1;
  min-height: 38px;
  border: 0;
  padding: 0 4px;
  color: #3488d1;
  background: transparent;
  font-size: 12px;
  font-weight: 750;
}

.product-modification-row .panel-actions {
  grid-column: 11 / span 2;
  min-width: 0;
}

.product-modification-row .panel-actions button {
  width: 100%;
  min-width: 0;
}

.product-modification-row input,
.product-modification-row select {
  width: 100%;
  min-height: 38px;
  border: 1px solid #cfd4d7;
  border-radius: 5px;
  padding: 0 9px;
  background: #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 750;
}

.product-mod-symbol {
  display: grid;
  place-items: center;
  min-height: 38px;
  color: #c4c7c8;
  font-size: 22px;
  font-weight: 900;
}

.product-mod-add-link {
  justify-self: start;
  min-height: auto;
  border: 0;
  padding: 0;
  color: #3488d1;
  background: transparent;
  font-size: 14px;
  font-weight: 750;
}

.pos-function-list b {
  color: #0c5449;
  font-size: 12px;
}

.pos-home {
  display: grid;
  grid-template-columns: minmax(180px, 0.45fr) minmax(360px, 1fr) minmax(280px, 0.7fr);
  gap: 14px;
  margin-bottom: 14px;
}

.pos-home .panel {
  min-height: 0;
}

.pos-home-actions {
  display: grid;
  gap: 8px;
}

.pos-home-actions .panel-head {
  margin-bottom: 2px;
}

.pos-home-actions button {
  min-height: 44px;
  justify-content: center;
}

.table-link-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.table-link-actions button {
  min-height: 38px;
  padding: 0 8px;
  font-size: 12px;
}

.check-link-mode {
  display: grid;
  gap: 8px;
  padding: 10px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  background: #f8faf8;
}

.check-link-mode strong {
  display: block;
  margin-bottom: 2px;
  font-size: 13px;
}

.check-link-mode small {
  display: block;
  color: var(--muted);
  line-height: 1.35;
}

button.active-soft {
  color: #0c5449;
  border-color: #b8dccd;
  background: #e8f3ef;
  font-weight: 800;
}

.pos-ledger-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 8px;
}

.pos-ledger-grid button {
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: 76px;
  padding: 9px;
  text-align: left;
  background: #fff;
}

.pos-ledger-grid button.active {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}

.pos-ledger-grid button.has-debt {
  border-color: #efdca8;
  background: #fffaf0;
}

.pos-ledger-grid button.active.has-debt {
  background: var(--accent);
}

.pos-ledger-grid strong,
.pos-ledger-grid span,
.pos-ledger-grid small {
  display: block;
}

.pos-ledger-grid span {
  font-weight: 800;
}

.pos-ledger-grid small {
  color: inherit;
  opacity: 0.72;
  font-size: 11px;
}

.pos-open-checks {
  display: grid;
  gap: 8px;
  max-height: 262px;
  overflow: auto;
}

.pos-home-online {
  grid-column: 1 / -1;
}

.pos-online-orders {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.pos-online-order {
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.pos-online-order.cooking {
  border-color: #edd6a6;
  background: #fffaf0;
}

.pos-online-order.ready,
.pos-online-order.courier {
  border-color: #b8dccd;
  background: #f2faf6;
}

.pos-online-main,
.pos-online-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 10px;
}

.pos-online-main strong,
.pos-online-main small {
  display: block;
}

.pos-online-main small,
.pos-online-items {
  color: var(--muted);
}

.pos-online-main b {
  font-size: 18px;
  white-space: nowrap;
}

.pos-online-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.pos-online-items {
  min-height: 32px;
  font-size: 12px;
  line-height: 1.35;
}

.pos-online-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.pos-online-actions button {
  min-height: 36px;
  padding: 0 8px;
}

.pos-check-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.pos-check-open {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 9px 10px;
  text-align: left;
}

.pos-check-open strong,
.pos-check-open small {
  display: block;
}

.pos-check-open small {
  color: var(--muted);
  margin-top: 3px;
}

.pos-check-open span {
  font-weight: 800;
}

.pos-check-delete {
  min-height: 44px;
  padding: 0 12px;
  color: #8f2525;
  border-color: #f0b7ad;
  background: #fff8f6;
}

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

.kitchen-column {
  min-height: 320px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f8f4;
}

.kitchen-column h3 {
  margin: 0 0 10px;
  font-size: 14px;
}

.kitchen-recipe-panel {
  margin: 10px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.kitchen-recipe-head {
  display: grid;
  gap: 3px;
  margin-bottom: 8px;
}

.kitchen-recipe-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 6px;
  margin-bottom: 10px;
}

.kitchen-recipe-picker button {
  display: grid;
  gap: 2px;
  min-height: 58px;
  padding: 8px;
  text-align: left;
  border-radius: 8px;
  background: #f6f8f4;
}

.kitchen-recipe-picker button.active {
  border-color: var(--brand);
  background: #e5f1ed;
  color: var(--brand);
}

.kitchen-recipe-picker span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.kitchen-recipe-head small {
  color: var(--muted);
}

.kitchen-recipe-list {
  display: grid;
  gap: 6px;
}

.kitchen-recipe-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 7px;
  background: #f6f8f4;
  font-size: 13px;
}

.kitchen-recipe-line strong {
  white-space: nowrap;
}

.kitchen-recipe-empty {
  padding: 9px;
  border-radius: 7px;
  background: #fff8e8;
  color: #73510b;
  font-size: 13px;
}

.delivery-order {
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) minmax(200px, 1fr) minmax(170px, 0.8fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.content-grid.delivery-admin-grid {
  grid-template-columns: minmax(0, 1.22fr) minmax(360px, 0.78fr);
  align-items: start;
}

.delivery-admin-grid .delivery-admin-overview {
  grid-column: 1 / -1;
}

.delivery-admin-channels,
.delivery-admin-map {
  min-width: 0;
  overflow: hidden;
}

#delivery .panel {
  min-width: 0;
}

#delivery .panel-head {
  align-items: center;
  gap: 14px;
}

#delivery .panel-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

#delivery .panel-actions button {
  min-height: 38px;
}

.delivery-workspace-head {
  border: 1px solid #cfe2d9;
  background: #f8fcf9;
}

.delivery-workspace-head small {
  max-width: 760px;
}

.delivery-zone {
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) minmax(150px, 1fr) minmax(70px, 0.52fr) minmax(70px, 0.52fr) minmax(82px, 0.58fr) minmax(70px, 0.5fr) minmax(118px, 0.75fr) auto;
  align-items: end;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.delivery-zone.inactive {
  background: #f8f4ed;
}

.delivery-zone strong,
.delivery-zone small {
  display: block;
}

.delivery-zone small {
  color: var(--muted);
  margin-top: 3px;
}

.delivery-zone label,
.delivery-map-card label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.delivery-zone input,
.delivery-zone select,
.delivery-map-card input,
.delivery-map-card select {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 9px;
  color: var(--ink);
  background: #fff;
}

.delivery-channel-row {
  grid-template-columns: minmax(0, 1fr) minmax(150px, auto);
  align-items: center;
  min-width: 0;
}

.delivery-channel-row > div:first-child {
  min-width: 0;
}

.delivery-channel-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

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

.delivery-integration.bolt {
  border-color: #b8dccd;
  background: #f3faf6;
}

.delivery-integration.glovo {
  border-color: #ead9a6;
  background: #fffaf0;
}

.integration-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  padding-bottom: 2px;
}

.integration-head strong,
.integration-head small {
  display: block;
}

.integration-head small {
  color: var(--muted);
  margin-top: 3px;
}

.integration-fields {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr);
  gap: 10px;
  min-width: 0;
}

.delivery-integration label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.delivery-integration input[type="text"],
.delivery-integration input[type="password"],
.delivery-integration input:not([type]) {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 9px;
  color: var(--ink);
  background: #fff;
}

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

.integration-toggle {
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px !important;
  align-items: center;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink) !important;
  cursor: pointer;
}

.integration-toggle strong,
.integration-toggle small {
  display: block;
  min-width: 0;
}

.integration-toggle strong {
  font-size: 13px;
  line-height: 1.15;
}

.integration-toggle small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.integration-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.toggle-visual {
  width: 34px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid #cdd7cf;
  background: #e9eee8;
  position: relative;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.toggle-visual::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(21, 35, 29, 0.24);
  transition: transform 0.15s ease;
}

.integration-toggle input:checked + .toggle-visual {
  border-color: #0f6c5c;
  background: #146b5d;
}

.integration-toggle input:checked + .toggle-visual::after {
  transform: translateX(12px);
}

.integration-actions {
  justify-content: flex-start;
  gap: 8px;
  padding-top: 2px;
  flex-wrap: wrap;
}

.integration-actions button {
  min-height: 34px;
  padding: 0 12px;
}

.toggle-row {
  display: grid;
  gap: 7px;
  justify-items: end;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.toggle-row label {
  display: flex;
  gap: 6px;
  align-items: center;
}

.delivery-map-card {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.delivery-map-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(180px, 0.75fr);
  gap: 12px;
  align-items: end;
  min-width: 0;
}

.delivery-origin-field {
  min-width: 0;
}

.delivery-map-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.delivery-map-footer .result-box {
  margin: 0;
}

.delivery-map-footer button {
  min-height: 42px;
  white-space: nowrap;
  justify-self: end;
  max-width: 100%;
}

.pos-delivery-card {
  display: grid;
  gap: 9px;
  margin-bottom: 10px;
  border: 1px solid #b8dccd;
  border-radius: 8px;
  padding: 10px;
  background: #f3faf6;
}

.pos-delivery-card strong,
.pos-delivery-card small {
  display: block;
}

.pos-delivery-card small {
  color: var(--muted);
  margin-top: 3px;
}

.voice-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.address-autocomplete-field {
  position: relative;
  display: grid;
  gap: 5px;
  min-width: 0;
}

.address-autocomplete-field > input {
  min-width: 0;
}

.address-suggestions {
  position: absolute;
  z-index: 40;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  display: grid;
  gap: 2px;
  max-height: 240px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 32px rgba(18, 29, 24, 0.14);
}

.address-suggestions:empty {
  display: none;
}

.address-suggestions button,
.address-suggestions span {
  width: 100%;
  min-height: 0;
  padding: 9px 10px;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.address-suggestions button:hover {
  background: #eef8f2;
}

.address-suggestions strong,
.address-suggestions small {
  display: block;
}

.address-suggestions small,
.address-autocomplete-field > small {
  color: var(--muted);
  line-height: 1.25;
}

.table-address-field .address-suggestions {
  min-width: min(420px, 80vw);
}

.pos-address-field {
  width: 100%;
}

.voice-input-row button {
  min-width: 44px;
  min-height: 34px;
  white-space: nowrap;
}

.voice-input-row .voice-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  aspect-ratio: 1;
}

.voice-icon-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.voice-input-row button.listening {
  border-color: rgba(193, 65, 65, 0.36);
  color: #9a3333;
  background: #fff1f1;
}

.voice-status {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.pos-supply-target {
  display: grid;
  gap: 6px;
  margin: 10px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.pos-supply-target select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  color: var(--ink);
  background: #fff;
}

#deliveryFeeRow {
  display: none;
}

#deliveryFeeRow.visible {
  display: flex;
}

.zone-map {
  height: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #edf1ea;
}

.zone-map span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #146b5d, #d6a637);
}

.delivery-order.late {
  border-color: #e5a49d;
  background: #fff7f5;
}

.delivery-order strong,
.delivery-order small {
  display: block;
}

.delivery-order small {
  display: none;
}

.delivery-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.delivery-workspace-head,
.delivery-order-top,
.delivery-status-line,
.delivery-payment-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.delivery-workspace-head {
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
}

.delivery-workspace-head strong,
.delivery-order-top strong {
  display: block;
  color: var(--ink);
}

.delivery-workspace-head small,
.delivery-order-top small,
.delivery-payment-link small,
.delivery-event-log small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.delivery-workspace-metrics {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.delivery-order-grid {
  display: grid;
  gap: 10px;
}

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

.delivery-order-card.waiting-pay {
  border-color: #ead0a5;
  background: #fffaf0;
}

.delivery-order-card.paid {
  border-color: #b8ded1;
  background: #f7fcf9;
}

.delivery-status-line {
  justify-content: flex-start;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.delivery-order-items,
.delivery-payment-link,
.delivery-event-log {
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcf8;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.delivery-payment-link span {
  overflow-wrap: anywhere;
}

.delivery-event-log {
  display: grid;
  gap: 6px;
}

.delivery-event-log span {
  display: block;
}

.delivery-zone-subhead {
  margin-top: 16px;
}

.ticket {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

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

.ticket-actions.single {
  grid-template-columns: 1fr;
}

.ticket-action-primary {
  color: #fff;
  border-color: var(--brand);
  background: var(--brand);
}

.ticket-action-delete {
  color: #842016;
  border-color: #efd0c9;
  background: #fff6f4;
}

.content-grid {
  grid-template-columns: minmax(520px, 1.2fr) minmax(320px, 0.8fr);
}

.content-grid.delivery-admin-grid {
  grid-template-columns: minmax(0, 1.22fr) minmax(360px, 0.78fr);
}

.content-grid.settings-grid {
  grid-template-columns: minmax(0, 1fr);
}

.settings-grid .wide {
  grid-column: auto;
}

.wide {
  grid-column: span 2;
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.module-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.module-tabs button {
  min-height: 30px;
  border-radius: 6px;
  padding: 0 10px;
  font-size: 12px;
}

.module-tabs button.active {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}

.analytics-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.analytics-controls select,
.analytics-controls input {
  flex: 0 1 150px;
  min-width: 132px;
}

.sales-nav-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  margin-bottom: 14px;
  padding: 12px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.sales-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 0;
  align-content: start;
  min-width: 0;
  overflow: visible;
  padding-bottom: 0;
}

.sales-tabs button {
  flex: 0 0 auto;
}

.sales-report-panel {
  min-height: calc(100vh - 184px);
  min-width: 0;
  overflow: hidden;
}

.sales-report-panel.hidden,
.sales-overview-area.hidden {
  display: none;
}

.sales-table-wrap {
  max-height: calc(100vh - 300px);
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.refund-report-cell {
  display: inline-flex;
  align-items: center;
  max-width: 170px;
  gap: 8px;
}

.refund-report-cell span:last-child {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.refund-report-cell strong,
.refund-report-cell small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.refund-report-cell strong {
  font-size: 12px;
}

.refund-report-cell small {
  color: var(--muted);
  font-size: 10px;
}

.sales-check-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: end;
  margin-bottom: 10px;
  padding: 10px;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf7;
}

.sales-check-filters label {
  display: grid;
  flex: 1 1 126px;
  gap: 4px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.sales-check-filters input,
.sales-check-filters select {
  width: 100%;
  min-height: 32px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
}

.sales-check-filters button {
  flex: 0 0 auto;
  min-height: 32px;
  padding-inline: 10px;
}

.sales-filter-search {
  flex-basis: 210px;
}

.sales-summary-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.sales-summary-strip div {
  min-height: 70px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 10px 14px;
  border-right: 1px solid var(--line);
}

.sales-summary-strip div:last-child {
  border-right: 0;
}

.sales-summary-strip small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.sales-summary-strip strong {
  color: var(--ink);
  font-size: 18px;
}

.sales-summary-strip .sales-delta {
  margin-top: 2px;
}

.sales-comparison-panel {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8faf7;
}

.sales-comparison-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sales-comparison-head strong,
.sales-comparison-head small,
.sales-comparison-grid strong,
.sales-comparison-grid small {
  display: block;
}

.sales-comparison-head small,
.sales-comparison-grid small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.sales-comparison-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
}

.sales-comparison-grid div {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.sales-comparison-grid strong {
  color: var(--ink);
  font-size: 16px;
}

.sales-insight-list {
  display: grid;
  gap: 6px;
}

.sales-insight-list span {
  border-left: 3px solid var(--accent);
  padding: 7px 10px;
  color: var(--ink);
  background: #fff;
  font-size: 12px;
  line-height: 1.35;
}

.sales-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.sales-overview-grid .wide {
  grid-column: 1 / -1;
}

.sales-bars {
  display: grid;
  gap: 10px;
}

.sales-bar-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(180px, 1fr);
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.sales-bar-row:last-child {
  border-bottom: 0;
}

.sales-bar-row strong,
.sales-bar-row small {
  display: block;
}

.sales-bar-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.sales-bar-cell {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
}

.sales-bar-cell b {
  min-width: 86px;
  text-align: right;
}

.sales-mini-chart {
  min-height: 210px;
  display: grid;
  grid-template-columns: repeat(14, minmax(18px, 1fr));
  align-items: end;
  gap: 6px;
  padding: 8px 4px 0;
}

.sales-mini-bar {
  min-height: 190px;
  display: grid;
  grid-template-rows: 1fr 24px;
  align-items: end;
  gap: 6px;
}

.sales-mini-bar span {
  width: 100%;
  min-height: 8px;
  border-radius: 5px 5px 0 0;
  background: #315c9a;
}

.sales-mini-bar small {
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.sales-popular-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 18px;
}

.sales-popular-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 84px 110px;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.sales-popular-row strong,
.sales-popular-row small {
  display: block;
}

.sales-popular-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.sales-popular-row span {
  color: var(--muted);
  text-align: right;
}

.sales-popular-row b {
  text-align: right;
}

.sales-table td:first-child strong,
.sales-table td:first-child small {
  display: block;
}

.sales-table {
  width: 100%;
  min-width: 0;
  table-layout: auto;
}

.sales-table th,
.sales-table td {
  padding: 8px 7px;
  max-width: 180px;
  vertical-align: middle;
  white-space: normal;
  overflow-wrap: anywhere;
}

.sales-check-table {
  table-layout: fixed;
  font-size: 12px;
}

.sales-check-table th,
.sales-check-table td {
  padding: 7px 6px;
}

.sales-check-table th:nth-child(1),
.sales-check-table td:nth-child(1) {
  width: 118px;
}

.sales-check-table th:nth-child(2),
.sales-check-table td:nth-child(2) {
  width: 126px;
}

.sales-check-table th:nth-child(7),
.sales-check-table td:nth-child(7),
.sales-check-table th:nth-child(9),
.sales-check-table td:nth-child(9),
.sales-check-table th:nth-child(10),
.sales-check-table td:nth-child(10) {
  width: 76px;
  text-align: center;
}

.sales-check-table th:nth-child(8),
.sales-check-table td:nth-child(8),
.sales-check-table th:nth-child(11),
.sales-check-table td:nth-child(11) {
  width: 104px;
}

.sales-table th:nth-child(9),
.sales-table td:nth-child(9) {
  width: 74px;
  text-align: center;
}

.sales-table th:nth-child(2),
.sales-table td:nth-child(2),
.sales-table th:nth-child(3),
.sales-table td:nth-child(3),
.sales-table th:nth-child(4),
.sales-table td:nth-child(4) {
  white-space: normal;
}

.sales-table td:first-child small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 1320px) {
  .sales-check-table th:nth-child(3),
  .sales-check-table td:nth-child(3),
  .sales-check-table th:nth-child(10),
  .sales-check-table td:nth-child(10) {
    display: none;
  }

  .sales-check-detail-row td {
    display: table-cell !important;
  }
}

@media (max-width: 1120px) {
  .sales-check-table th:nth-child(6),
  .sales-check-table td:nth-child(6) {
    display: none;
  }
}

.sales-check-row {
  cursor: pointer;
}

.sales-check-row.open,
.sales-check-row:hover {
  background: #f6fbf8;
}

.sales-check-row.highlighted td {
  background: #fff9de;
  border-color: #ead27b;
  transition: background-color 0.85s ease, border-color 0.85s ease, box-shadow 0.85s ease;
}

.sales-check-row.highlighted td:first-child {
  box-shadow: inset 4px 0 0 var(--accent);
}

.sales-check-row.highlighted.fade-out td {
  background: #ffffff;
  border-color: var(--line);
}

.sales-check-row.highlighted.fade-out td:first-child {
  box-shadow: inset 0 0 0 transparent;
}

.sales-check-detail-row td {
  padding: 0;
  background: #fbfdfb;
}

.sales-check-detail-panel {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 10px 12px 12px;
}

.sales-check-detail-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.sales-check-detail-tabs button {
  min-height: 32px;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
  color: var(--ink);
}

.sales-check-detail-tabs button.active,
.sales-check-detail-tabs button[aria-current="true"] {
  border-color: #0f766e;
  background: #0f766e;
  color: #fff;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28), 0 2px 7px rgba(15, 118, 110, 0.2);
}

.sales-check-detail-tabs button.active:hover,
.sales-check-detail-tabs button[aria-current="true"]:hover,
.sales-check-detail-tabs button.active:focus-visible,
.sales-check-detail-tabs button[aria-current="true"]:focus-visible {
  border-color: #0b5f52;
  background: #0b5f52;
  color: #fff;
}

.sales-check-detail-content {
  max-height: min(420px, 52vh);
  overflow: auto;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto;
  scrollbar-gutter: stable;
}

.sales-check-detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.sales-check-detail-table th,
.sales-check-detail-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.sales-check-detail-table th {
  color: var(--muted);
  font-weight: 800;
}

.sales-check-detail-table td:nth-child(n + 2),
.sales-check-detail-table th:nth-child(n + 2),
.sales-check-detail-table tfoot td:last-child {
  text-align: right;
}

.sales-check-detail-table tfoot td {
  font-weight: 900;
}

.sales-check-detail-table small,
.sales-check-client-line {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.sales-check-client-line {
  padding: 10px;
}

.sales-check-timeline {
  display: grid;
  gap: 6px;
}

.sales-check-event {
  display: grid;
  grid-template-columns: 120px 1fr 2fr;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}

.sales-check-event span,
.sales-check-event small {
  color: var(--muted);
}

.sales-check-event.tone-green {
  background: #edf8f2;
}

.sales-check-event.tone-yellow {
  background: #fff8e6;
}

.sales-check-event.tone-red {
  background: #fff0f0;
}

.sales-check-prro {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.sales-check-prro div {
  min-height: 70px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}

.sales-check-prro small,
.sales-check-prro strong {
  display: block;
}

.sales-check-prro small {
  color: var(--muted);
  margin-bottom: 5px;
}

.sales-kpi-grid {
  margin-bottom: 16px;
}

.module-body {
  max-height: 460px;
  min-width: 0;
  overflow: auto;
  scrollbar-gutter: stable both-edges;
}

#finance.view.active {
  min-height: calc(100vh - 72px);
  display: flex;
  flex-direction: column;
  padding: 16px 20px 0;
}

#finance .content-grid {
  flex: 1 1 auto;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
}

#finance .panel.wide {
  grid-column: 1 / -1;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding: 14px 16px;
}

#finance .panel-head {
  margin-bottom: 10px;
}

#finance .module-tabs {
  margin-bottom: 8px;
}

#finance .module-body {
  flex: 1 1 auto;
  max-height: none;
  overflow: visible;
  scrollbar-gutter: auto;
  gap: 8px;
}

#finance .module-action-bar {
  margin: 0;
}

#finance .fiscal-master {
  min-height: 100%;
}

#finance .finance-accounts-panel {
  gap: 8px;
  padding: 10px;
}

#finance .account-summary-grid {
  gap: 8px;
}

#finance .account-summary-grid div {
  padding: 8px 10px;
}

#finance .account-summary-grid strong {
  font-size: 18px;
}

#finance .account-transfer-panel {
  gap: 8px;
}

#finance .module-table-wrap {
  max-height: none;
}

body.view-menu .main {
  display: block;
  overflow-y: auto;
  overflow-x: hidden;
}

body.view-menu .topbar {
  position: sticky;
}

#menu.view.active {
  display: block;
  min-height: auto;
}

#menu .content-grid {
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: auto;
  align-items: start;
}

#menu .panel.wide {
  grid-column: 1 / -1;
  display: block;
  min-height: auto;
}

#menu .module-body {
  display: grid;
  gap: 10px;
  min-height: auto;
  max-height: none;
  overflow: visible;
  scrollbar-gutter: auto;
}

#menu .module-body > .module-table-wrap {
  min-height: 0;
  max-height: none;
  overflow-x: auto;
  overflow-y: hidden;
}

#menu .stock-items-table-wrap,
#menu .stock-category-table-wrap,
#menu .menu-dish-table-wrap,
#menu .recipe-register-table-wrap,
#menu .modifier-catalog-table-wrap {
  max-height: none !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
}

#menu .recipe-dashboard {
  gap: 8px;
}

#menu .recipe-dashboard > button,
#menu .recipe-dashboard > div {
  min-height: 74px;
  padding: 9px 10px;
}

#menu .recipe-dashboard strong {
  font-size: 22px;
}

#menu .recipe-ops-panel {
  gap: 10px;
  padding: 10px 12px;
}

#menu .recipe-ops-panel h3 {
  font-size: 18px;
}

#menu .recipe-ops-panel p {
  max-width: none;
  margin: 0;
  font-size: 13px;
  line-height: 1.25;
}

#menu .filter-bar {
  margin-bottom: 6px;
  padding: 8px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf7;
}

.filter-bar label {
  display: grid;
  min-width: 170px;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.filter-bar select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  color: var(--ink);
  background: #fff;
}

.filter-bar input {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  color: var(--ink);
  background: #fff;
}

.module-table-wrap {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  max-height: min(68vh, 720px);
  overflow-x: auto;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  scrollbar-gutter: stable both-edges;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
}

.menu-dish-table-wrap,
.modifier-catalog-table-wrap,
.settings-order-table-wrap,
.settings-payment-table-wrap,
.sales-table-wrap,
.inventory-table-wrap,
.stock-transfer-table {
  max-height: min(64vh, 680px);
  overflow-x: auto;
  overflow-y: auto;
  scrollbar-gutter: stable both-edges;
}

.sales-table-wrap {
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

.panel > .module-table-wrap,
.module-body > .module-table-wrap,
.settings-workspace-section > .module-table-wrap {
  display: block;
}

.module-table-wrap::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.module-table-wrap::-webkit-scrollbar-thumb {
  border: 2px solid #fff;
  border-radius: 999px;
  background: #cbd6ce;
}

.module-table-wrap::-webkit-scrollbar-track {
  border-radius: 999px;
  background: #edf3ef;
}

.module-table-wrap::-webkit-scrollbar-corner {
  background: #f6faf7;
}

.module-table-xbar {
  position: sticky;
  top: 0;
  z-index: 12;
  width: 100%;
  max-width: 100%;
  height: 16px;
  margin: 6px 0 2px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f6faf7;
  scrollbar-gutter: stable;
}

.module-table-xbar > div {
  height: 1px;
}

.module-table-xbar::-webkit-scrollbar {
  height: 12px;
}

.module-table-xbar::-webkit-scrollbar-thumb {
  border: 2px solid #f6faf7;
  border-radius: 999px;
  background: #167463;
}

.module-table-xbar::-webkit-scrollbar-track {
  border-radius: 999px;
  background: #e3eee8;
}

.module-table {
  width: max-content;
  min-width: max(100%, 980px);
  border-collapse: collapse;
  font-size: 12px;
}

.modifier-catalog-table {
  min-width: 980px;
}

.settings-order-table {
  min-width: 760px;
}

.settings-payment-table {
  min-width: 1120px;
}

.module-table .small-input {
  width: 86px;
  min-width: 86px;
}

.modifier-catalog-table th:nth-child(4),
.modifier-catalog-table td:nth-child(4) {
  width: 128px;
  max-width: 128px;
}

.compact-link-button {
  min-height: 32px;
  max-width: 140px;
  padding: 6px 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modifier-detail-row td {
  padding: 0;
  background: #f7faf7;
  min-width: 0;
}

.modifier-detail-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-top: 1px solid var(--line);
  min-width: 0;
  overflow: hidden;
}

.modifier-context-note {
  border: 1px solid #cfe7dd;
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--green-800);
  background: #f0faf5;
  font-size: 13px;
  line-height: 1.35;
}

.modifier-detail-grid,
.modifier-window-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
}

.modifier-detail-grid label,
.modifier-window-grid label,
.modifier-picker label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-weight: 700;
}

.modifier-window-grid .wide {
  grid-column: 1 / -1;
}

.modifier-linked-list {
  display: block;
  max-width: 100%;
  overflow: hidden;
}

.modifier-linked-list summary {
  width: fit-content;
  max-width: 100%;
  list-style: none;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 14px;
  color: var(--green);
  font-weight: 800;
  background: var(--green-soft);
}

.modifier-linked-list summary::-webkit-details-marker {
  display: none;
}

.modifier-linked-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  margin-top: 10px;
  max-width: 100%;
}

.modifier-linked-items button {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modifier-picker {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin: 10px 0 12px;
}

.modifier-window {
  max-width: 980px;
}

@media (max-width: 900px) {
  .modifier-detail-grid,
  .modifier-window-grid,
  .modifier-picker {
    grid-template-columns: 1fr;
  }
}

.module-table th,
.module-table td {
  border-bottom: 1px solid var(--line);
  padding: 9px 10px;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.module-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--muted);
  font-weight: 700;
  background: #f8faf7;
}

.module-table th:last-child,
.module-table td:last-child {
  position: sticky;
  right: 0;
  z-index: 3;
  width: 168px;
  min-width: 168px;
  max-width: 168px;
  background: #fff;
  box-shadow: none;
}

.module-table th:last-child {
  z-index: 5;
  text-align: center;
  background: #f8faf7;
}

.module-table tr:hover td {
  background: #fbfcfa;
}

.module-table tr:hover td:last-child {
  background: #fbfcfa;
}

.supplier-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.supplier-table-wrap {
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

.supplier-table th,
.supplier-table td {
  white-space: normal;
  overflow-wrap: anywhere;
}

.supplier-table th:nth-child(1),
.supplier-table td:nth-child(1) {
  width: 16%;
}

.supplier-table th:nth-child(2),
.supplier-table td:nth-child(2) {
  width: 14%;
}

.supplier-table th:nth-child(3),
.supplier-table td:nth-child(3) {
  width: 6%;
  text-align: center;
}

.supplier-table th:nth-child(5),
.supplier-table td:nth-child(5) {
  width: 7%;
  text-align: center;
}

.supplier-table th:nth-child(4),
.supplier-table td:nth-child(4) {
  width: 20%;
  max-width: none;
  white-space: normal;
}

.supplier-table th:nth-child(6),
.supplier-table td:nth-child(6) {
  width: 11%;
}

.module-table.supplier-table th:last-child,
.module-table.supplier-table td:last-child {
  position: static;
  right: auto;
  z-index: auto;
  width: 26%;
  min-width: 0;
  max-width: none;
  box-shadow: none;
}

.module-table.supplier-table th:last-child {
  background: #f8faf7;
}

.module-table.supplier-table td:last-child {
  background: transparent;
}

.module-table.supplier-table tr:hover td:last-child {
  background: #fbfcfa;
}

.supplier-categories-cell {
  white-space: normal;
}

.supplier-actions-cell {
  vertical-align: middle;
}

.supplier-category-list {
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.supplier-category-list:hover,
.supplier-category-list:focus-visible {
  -webkit-line-clamp: initial;
}

.supplier-table .row-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  justify-content: stretch;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.supplier-table td:nth-child(6) small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.15;
}

.supplier-table .name-cell,
.supplier-table input,
.supplier-table select {
  min-width: 0;
}

.supplier-status-select {
  width: 100%;
  max-width: none;
  padding: 0 6px;
  font-size: 11px;
}

.supplier-table .row-actions button {
  width: 100%;
  min-width: 0;
  padding: 0 7px;
  font-size: 11px;
}

.supplier-table .row-actions button[data-supplier-delete] {
  grid-column: 1 / -1;
}

.stock-items-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  font-size: 11px;
}

.stock-items-table-wrap {
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

.stock-items-table th,
.stock-items-table td {
  box-sizing: border-box;
  padding: 7px 6px;
  overflow: hidden;
  white-space: normal;
  overflow-wrap: anywhere;
}

.stock-items-table th:nth-child(1),
.stock-items-table td:nth-child(1) {
  width: 20%;
}

.stock-items-table th:nth-child(2),
.stock-items-table td:nth-child(2) {
  width: 14%;
}

.stock-items-table th:nth-child(3),
.stock-items-table td:nth-child(3) {
  width: 15%;
}

.stock-items-table th:nth-child(4),
.stock-items-table td:nth-child(4) {
  width: 14%;
}

.stock-items-table th:nth-child(5),
.stock-items-table td:nth-child(5) {
  width: 7%;
}

.stock-items-table th:nth-child(6),
.stock-items-table td:nth-child(6) {
  width: 9.5%;
}

.module-table.stock-items-table th:last-child,
.module-table.stock-items-table td:last-child {
  position: static;
  right: auto;
  z-index: auto;
  width: 20.5%;
  min-width: 0;
  max-width: none;
  box-shadow: none;
}

.module-table.stock-items-table th:last-child {
  background: #f8faf7;
}

.module-table.stock-items-table td:last-child {
  background: transparent;
}

.module-table.stock-items-table tr:hover td:last-child {
  background: #fbfcfa;
}

.stock-items-table .name-cell {
  min-width: 0;
}

.stock-items-table .media-link-cell {
  gap: 7px;
}

.stock-items-table .media-link-cell .media-thumb,
.stock-items-table .media-link-cell .media-placeholder {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
}

.stock-items-table input,
.stock-items-table select {
  min-width: 0;
  min-height: 30px;
  padding: 0 6px;
  font-size: 11px;
}

.stock-items-table td:nth-child(4) .inline-pair {
  grid-template-columns: minmax(42px, 0.7fr) minmax(42px, 0.48fr);
  gap: 5px;
}

.stock-items-table td:nth-child(5) input {
  text-align: center;
}

.stock-items-table td:nth-child(5) {
  padding-right: 10px;
}

.stock-items-table td:nth-child(6) {
  padding-left: 8px;
}

.stock-status-cell {
  text-align: center;
}

.stock-status-cell .badge,
.stock-status-cell button {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 6px 5px;
  overflow: hidden;
  font-size: 10px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stock-actions-cell {
  vertical-align: middle;
}

.stock-item-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  width: 100%;
  min-width: 0;
}

.stock-item-actions button {
  width: 100%;
  min-width: 0;
  min-height: 28px;
  padding: 0 6px;
  font-size: 10px;
}

.stock-item-actions button[data-stock-delete] {
  grid-column: 1 / -1;
}

.module-table tr.sales-check-row.highlighted td {
  background: #fff9de;
  border-color: #ead27b;
  transition: background-color 0.85s ease, border-color 0.85s ease, box-shadow 0.85s ease;
}

.module-table tr.sales-check-row.highlighted td:first-child {
  box-shadow: inset 4px 0 0 var(--accent);
}

.module-table tr.sales-check-row.highlighted.fade-out td {
  background: #ffffff;
  border-color: var(--line);
}

.module-table tr.sales-check-row.highlighted.fade-out td:first-child {
  box-shadow: inset 0 0 0 transparent;
}

.module-table tr.clickable-row {
  cursor: pointer;
}

.module-table tr.recipe-register-row td {
  vertical-align: middle;
}

.module-table tr.recipe-register-row .name-cell small {
  max-width: 240px;
}

.module-table tr.recipe-register-row .row-actions {
  min-width: 0;
}

.recipe-register-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  font-size: 12px;
}

.recipe-register-table td > small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 700;
}

.recipe-register-table th,
.recipe-register-table td {
  padding: 6px 6px;
}

.recipe-register-table th:nth-child(1),
.recipe-register-table td:nth-child(1) {
  width: 26%;
}

.recipe-register-table th:nth-child(2),
.recipe-register-table td:nth-child(2) {
  width: 12%;
}

.recipe-register-table th:nth-child(3),
.recipe-register-table td:nth-child(3) {
  width: 11%;
}

.recipe-register-table th:nth-child(4),
.recipe-register-table td:nth-child(4) {
  width: 10%;
}

.recipe-register-table th:nth-child(5),
.recipe-register-table td:nth-child(5),
.recipe-register-table th:nth-child(6),
.recipe-register-table td:nth-child(6) {
  width: 10%;
}

.recipe-register-table th:nth-child(7),
.recipe-register-table td:nth-child(7) {
  width: 21%;
  min-width: 0;
}

.recipe-register-table th:last-child,
.recipe-register-table td:last-child {
  position: static;
  right: auto;
  background: inherit;
  box-shadow: none;
}

.recipe-register-table .badge {
  max-width: 100%;
  padding: 5px 9px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recipe-register-table tr.recipe-register-row .name-cell small {
  max-width: 280px;
}

.recipe-register-table .name-cell {
  min-width: 0;
}

.recipe-register-table .media-link-cell {
  gap: 8px;
}

.recipe-register-table .media-link-cell .media-thumb,
.recipe-register-table .media-link-cell .media-placeholder {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
}

.recipe-register-table .recipe-register-actions-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.recipe-register-table .recipe-register-actions-cell > span:first-child {
  flex: 0 0 auto;
}

.recipe-register-table tr.recipe-register-row .row-actions,
.recipe-register-table .row-actions {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  min-width: 0;
  gap: 3px;
}

.recipe-register-table .row-actions button {
  border: 0;
  background: transparent;
  color: var(--blue);
  min-height: 30px;
  min-width: 0;
  padding: 0 4px;
  font-size: 12px;
  font-weight: 700;
}

.recipe-register-table .row-actions button.primary,
.recipe-register-table .row-actions button:hover {
  background: transparent;
  color: var(--green);
}

.module-table input,
.module-table select,
.module-table textarea {
  box-sizing: border-box;
  width: 100%;
  min-width: 86px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 8px;
  color: var(--ink);
  background: #fff;
}

.module-table textarea {
  min-height: 52px;
  padding-top: 6px;
  padding-bottom: 6px;
  line-height: 1.25;
  resize: vertical;
}

.module-table .name-cell {
  min-width: 220px;
  white-space: normal;
}

.module-table .name-cell strong,
.module-table .name-cell small {
  display: block;
}

.module-table .name-cell small {
  color: var(--muted);
  margin-top: 3px;
}

.menu-dish-table {
  min-width: 1240px;
  table-layout: auto;
  font-size: 11px;
}

.menu-dish-table th,
.menu-dish-table td {
  padding: 7px 6px;
}

.menu-dish-table th:nth-child(1),
.menu-dish-table td:nth-child(1) {
  min-width: 210px;
}

.menu-dish-table th:nth-child(2),
.menu-dish-table td:nth-child(2) {
  min-width: 120px;
}

.menu-dish-table th:nth-child(3),
.menu-dish-table td:nth-child(3) {
  min-width: 78px;
}

.menu-dish-table th:nth-child(4),
.menu-dish-table td:nth-child(4) {
  min-width: 128px;
}

.menu-dish-table th:nth-child(5),
.menu-dish-table td:nth-child(5),
.menu-dish-table th:nth-child(6),
.menu-dish-table td:nth-child(6) {
  min-width: 92px;
}

.menu-dish-table th:nth-child(7),
.menu-dish-table td:nth-child(7) {
  min-width: 86px;
}

.menu-dish-table th:nth-child(8),
.menu-dish-table td:nth-child(8) {
  min-width: 116px;
}

.menu-dish-table th:nth-child(9),
.menu-dish-table td:nth-child(9) {
  min-width: 112px;
}

.menu-dish-table th:nth-child(10),
.menu-dish-table td:nth-child(10) {
  min-width: 132px;
}

.menu-dish-table input,
.menu-dish-table select {
  min-width: 0;
  min-height: 28px;
  padding: 0 6px;
  font-size: 11px;
}

.menu-dish-table .name-cell {
  min-width: 0;
}

.menu-dish-table .media-link-cell {
  gap: 7px;
}

.menu-dish-table .media-link-cell .media-thumb,
.menu-dish-table .media-link-cell .media-placeholder {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
}

.menu-dish-table .inline-pair {
  grid-template-columns: minmax(0, 1fr) 54px;
  gap: 5px;
}

.menu-dish-table .row-actions {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 4px;
}

.menu-dish-table .row-actions button {
  flex: 0 0 auto;
  min-width: 0;
  padding: 0 6px;
  font-size: 11px;
}

.recipe-parts.readonly-parts {
  gap: 6px;
}

.recipe-part-row.readonly-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.recipe-part-row.readonly-row strong,
.recipe-part-row.readonly-row small {
  display: block;
}

.recipe-part-row.readonly-row small {
  color: var(--muted);
  margin-top: 2px;
}

.fiscal-wizard {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.fiscal-simple-panel {
  border: 1px solid #a9d9c8;
  border-radius: 8px;
  padding: 14px;
  background: linear-gradient(180deg, #f4fbf7 0%, #fff 100%);
}

.fiscal-simple-panel.ready {
  background: var(--green-soft);
}

.fiscal-next-step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.fiscal-next-step small,
.fiscal-next-step strong,
.fiscal-next-step span {
  display: block;
  min-width: 0;
}

.fiscal-next-step small {
  color: var(--muted);
  font-weight: 900;
}

.fiscal-next-step strong {
  margin-top: 2px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.15;
}

.fiscal-next-step span {
  margin-top: 5px;
  color: var(--muted);
  font-weight: 800;
}

.fiscal-simple-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.fiscal-simple-grid div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
}

.fiscal-simple-grid div.done {
  border-color: #9bcfbe;
  background: var(--green-soft);
}

.fiscal-simple-grid div.pending {
  background: #fffdf2;
}

.fiscal-simple-grid small,
.fiscal-simple-grid strong,
.fiscal-simple-grid span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fiscal-simple-grid small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.fiscal-simple-grid strong {
  margin-top: 2px;
  color: var(--ink);
  font-size: 14px;
}

.fiscal-simple-grid span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.fiscal-master {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #a9d9c8;
  border-radius: 8px;
  padding: 12px;
  background: #f7fbf8;
}

.fiscal-master-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.fiscal-master-head h3 {
  margin: 6px 0 3px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.12;
}

.fiscal-master-head small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-weight: 800;
}

.fiscal-master-steps {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.fiscal-master-steps div {
  min-width: 0;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 2px 7px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px;
  background: #fff;
}

.fiscal-master-steps div.done {
  border-color: #9bcfbe;
  background: var(--green-soft);
}

.fiscal-master-steps div.warn {
  border-color: #efb1a8;
  background: #fff4f2;
}

.fiscal-master-steps div.warn span {
  background: #ffe4df;
  color: #a83b32;
}

.fiscal-master-steps span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #eef6f1;
  color: var(--green);
  font-weight: 900;
}

.fiscal-master-steps strong,
.fiscal-master-steps small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fiscal-master-steps strong {
  font-size: 14px;
  line-height: 1.12;
  color: var(--ink);
}

.fiscal-master-steps small {
  font-size: 12px;
  line-height: 1.15;
  color: var(--muted);
  font-weight: 800;
}

.fiscal-master-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.fiscal-master-section {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.fiscal-master-section .fiscal-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 8px 0;
}

.fiscal-master-section .fiscal-form label {
  gap: 3px;
  font-size: 11px;
  line-height: 1.15;
}

.fiscal-master-section .fiscal-form input,
.fiscal-master-section .fiscal-form select {
  min-height: 30px;
  padding: 0 8px;
  font-size: 12px;
}

.fiscal-master-section .panel-head.subhead {
  min-height: 30px;
  gap: 8px;
  margin-top: 6px;
  margin-bottom: 8px;
  padding-top: 8px;
  padding-bottom: 6px;
}

.fiscal-master-section .panel-head.subhead h3 {
  font-size: 17px;
  line-height: 1.1;
}

.fiscal-master-section .badge {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fiscal-master-section textarea {
  width: 100%;
  min-height: 34px;
  padding: 6px 8px;
  font-size: 12px;
  resize: vertical;
}

.fiscal-key-mini {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf7;
}

.fiscal-key-mini strong,
.fiscal-key-mini small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.fiscal-key-mini small {
  color: var(--muted);
  font-weight: 800;
}

.fiscal-master-result .fiscal-verify-box {
  margin: 0;
}

.fiscal-master .fiscal-verify-box {
  gap: 6px 8px;
  padding: 7px;
}

.fiscal-master .fiscal-verify-box small {
  margin-top: 1px;
  font-size: 11px;
  line-height: 1.15;
}

.fiscal-master .fiscal-verify-checks {
  gap: 4px;
}

.fiscal-master .fiscal-verify-checks span {
  padding: 3px 6px;
  font-size: 11px;
}

.fiscal-master .fiscal-dps-steps {
  gap: 6px;
  margin-top: 8px;
}

.fiscal-master .fiscal-dps-steps div {
  padding: 6px 7px;
}

.fiscal-master .fiscal-dps-steps strong {
  font-size: 12px;
  line-height: 1.12;
}

.fiscal-master .fiscal-dps-steps small {
  font-size: 11px;
  line-height: 1.12;
}

.fiscal-master .fiscal-kpis {
  gap: 8px;
  margin: 6px 0;
}

.fiscal-master .fiscal-kpis div {
  padding: 7px;
}

.fiscal-master .panel-actions {
  gap: 8px;
}

.fiscal-master .panel-actions button {
  min-height: 34px;
  padding: 0 10px;
  white-space: nowrap;
}

.fiscal-details-block {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.fiscal-details-block .module-table-wrap {
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: visible;
  scrollbar-gutter: auto;
  padding-bottom: 0;
}

.fiscal-admin-table {
  min-width: 0;
}

.fiscal-details-block {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.fiscal-details-block > summary {
  cursor: pointer;
  padding: 12px 14px;
  color: var(--green);
  font-weight: 900;
}

.fiscal-details-block > .fiscal-card,
.fiscal-details-block > .fiscal-wizard,
.fiscal-details-block > .fiscal-setup-panel {
  margin: 0 12px 12px;
}

.fiscal-wizard + .fiscal-setup-panel {
  margin-top: 12px;
}

.fiscal-wizard-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.fiscal-wizard-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 5px 8px;
  align-items: start;
  min-height: 132px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #f8faf7;
}

.fiscal-wizard-step.current {
  border-color: #9bcfbe;
  box-shadow: 0 0 0 2px rgba(19, 119, 98, 0.08);
}

.fiscal-wizard-step.done {
  background: var(--green-soft);
}

.fiscal-wizard-step.locked {
  opacity: 0.58;
}

.fiscal-wizard-step > span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  color: #fff;
  background: var(--green);
  font-weight: 900;
}

.fiscal-wizard-step strong,
.fiscal-wizard-step small {
  display: block;
  min-width: 0;
}

.fiscal-wizard-step strong {
  color: var(--ink);
  font-size: 14px;
}

.fiscal-wizard-step small {
  grid-column: 1 / -1;
  min-height: 34px;
  color: var(--muted);
  font-weight: 800;
}

.fiscal-wizard-step button {
  grid-column: 1 / -1;
  min-height: 34px;
  padding: 7px 10px;
}

.fiscal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 12px;
  margin-top: 12px;
}

.fiscal-setup-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: linear-gradient(180deg, #f6fbf8 0%, #fff 100%);
}

.fiscal-progress {
  height: 8px;
  margin: 12px 0;
  overflow: hidden;
  border-radius: 999px;
  background: #e4ece5;
}

.fiscal-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

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

.fiscal-checklist span,
.fiscal-live-summary div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
  color: var(--muted);
  font-weight: 800;
}

.fiscal-checklist span.done {
  color: var(--green);
  background: var(--green-soft);
}

.fiscal-live-summary {
  margin-top: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.fiscal-live-summary small,
.fiscal-live-summary strong {
  display: block;
}

.fiscal-live-summary small {
  margin-bottom: 4px;
  color: var(--muted);
}

.fiscal-live-summary strong {
  color: var(--ink);
}

.fiscal-verify-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 10px;
  padding: 10px;
  background: #fff;
}

.fiscal-verify-box.verified {
  border-color: #9bcfbe;
  background: var(--green-soft);
}

.fiscal-verify-box.checking {
  background: #fffdf2;
}

.fiscal-verify-box strong,
.fiscal-verify-box small {
  display: block;
  min-width: 0;
}

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

.fiscal-verify-box small {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 800;
}

.fiscal-verify-checks {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 6px;
}

.fiscal-verify-checks span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 8px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.fiscal-verify-checks span.done {
  border-color: #9bcfbe;
  background: var(--green-soft);
  color: var(--green);
}

.fiscal-verify-checks span.warn {
  border-color: #f2d79b;
  background: #fff7df;
  color: #936200;
}

.fiscal-dps-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.fiscal-dps-steps div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 8px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
}

.fiscal-dps-steps div.done {
  background: var(--green-soft);
}

.fiscal-dps-steps span {
  grid-row: span 2;
  color: var(--green);
  font-weight: 900;
}

.fiscal-dps-steps strong,
.fiscal-dps-steps small {
  display: block;
  min-width: 0;
}

.fiscal-dps-steps strong {
  color: var(--ink);
  font-size: 13px;
}

.fiscal-dps-steps small {
  color: var(--muted);
  font-weight: 800;
}

.fiscal-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.fiscal-card + .fiscal-card {
  margin-top: 12px;
}

.fiscal-card h3 {
  margin: 0;
  font-size: 16px;
}

.fiscal-card .panel-head,
.fiscal-master-section .panel-actions {
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.fiscal-card .panel-actions button,
.fiscal-master-section .panel-actions button {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

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

.fiscal-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.fiscal-form input,
.fiscal-form select {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 10px;
  color: var(--ink);
  background: #fff;
}

.fiscal-technical-settings {
  margin: 10px 0 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf7;
}

.fiscal-technical-settings summary {
  cursor: pointer;
  padding: 10px 12px;
  color: var(--green);
  font-weight: 900;
}

.fiscal-technical-settings .fiscal-form {
  margin: 0;
  padding: 0 12px 10px;
}

.fiscal-technical-settings > small {
  display: block;
  padding: 0 12px 12px;
  color: var(--muted);
  font-weight: 800;
}

.fiscal-key-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.fiscal-key-summary div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #f8faf7;
}

.fiscal-key-summary small,
.fiscal-key-summary strong {
  display: block;
  min-width: 0;
}

.fiscal-key-summary small,
.fiscal-security-note {
  color: var(--muted);
  font-weight: 800;
}

.fiscal-key-summary strong {
  color: var(--ink);
}

.fiscal-security-note {
  display: block;
  margin-top: 8px;
}

.fiscal-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.fiscal-kpis div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #f8faf7;
}

.fiscal-kpis small,
.fiscal-kpis strong {
  display: block;
}

.fiscal-kpis small {
  color: var(--muted);
  margin-bottom: 4px;
}

.fiscal-kpis strong {
  white-space: normal;
}

.fiscal-admin-table {
  width: 100%;
  table-layout: fixed;
  font-size: 11px;
  min-width: 0;
}

.fiscal-admin-table th:nth-child(1),
.fiscal-admin-table td:nth-child(1) {
  width: 13%;
}

.fiscal-admin-table th:nth-child(2),
.fiscal-admin-table td:nth-child(2) {
  width: 17%;
}

.fiscal-admin-table th:nth-child(3),
.fiscal-admin-table td:nth-child(3) {
  width: 10%;
}

.fiscal-admin-table th:nth-child(4),
.fiscal-admin-table td:nth-child(4) {
  width: 10%;
}

.fiscal-admin-table th:nth-child(5),
.fiscal-admin-table td:nth-child(5) {
  width: 28%;
}

.fiscal-admin-table th:last-child,
.fiscal-admin-table td:last-child {
  position: static;
  right: auto;
  z-index: auto;
  width: 22%;
  min-width: 0;
  max-width: none;
  background: transparent;
  box-shadow: none;
  text-align: center;
}

.fiscal-admin-table th:last-child {
  text-align: center;
}

.fiscal-admin-table .row-actions {
  display: table-cell;
  text-align: center;
  vertical-align: middle;
  overflow: visible;
  white-space: normal;
  min-height: 100%;
  padding: 8px 10px;
}

.fiscal-admin-table .row-actions button,
.fiscal-admin-table .row-actions select {
  display: block;
  width: 100%;
  max-width: 152px;
  min-height: 34px;
  margin: 0 auto 8px;
  padding: 0 8px;
  overflow: visible;
  font-size: 11px;
  line-height: 1.05;
  text-overflow: clip;
  white-space: nowrap;
  text-align: center;
}

.fiscal-admin-table .row-actions button:last-child,
.fiscal-admin-table .row-actions select:last-child {
  margin-bottom: 0;
}

.fiscal-admin-table .row-actions .danger-button,
.fiscal-master-section .panel-actions .danger-button {
  color: #842016;
  border-color: #efd0c9;
  background: #fff6f4;
}

.fiscal-admin-table td {
  overflow: hidden;
  white-space: normal;
  overflow-wrap: anywhere;
}

.fiscal-admin-table input,
.fiscal-admin-table select,
.fiscal-admin-table textarea {
  width: 100%;
  min-width: 0;
  min-height: 28px;
  padding-inline: 7px;
  font-size: 11px;
}

.fiscal-admin-table textarea[data-fiscal-cashier-field$=":name"] {
  min-width: 0;
}

.fiscal-admin-table input[data-fiscal-cashier-field$=":login"] {
  min-width: 0;
}

.fiscal-admin-table input[data-fiscal-cashier-field$=":taxId"] {
  min-width: 0;
}

.fiscal-signature-cell {
  min-width: 0;
  white-space: normal;
}

.fiscal-signature-cell strong,
.fiscal-signature-cell small {
  display: block;
}

.fiscal-signature-cell strong {
  max-width: 100%;
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fiscal-signature-cell small {
  display: block;
  max-width: 100%;
  margin: 3px 0 7px;
  overflow: hidden;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fiscal-receipt-table {
  min-width: 1080px;
  table-layout: fixed;
}

.fiscal-receipt-table th:nth-child(1),
.fiscal-receipt-table td:nth-child(1) {
  width: 230px;
}

.fiscal-receipt-table th:nth-child(2),
.fiscal-receipt-table td:nth-child(2) {
  width: 260px;
}

.fiscal-receipt-table th:nth-child(3),
.fiscal-receipt-table td:nth-child(3) {
  width: 72px;
}

.fiscal-receipt-table th:nth-child(4),
.fiscal-receipt-table td:nth-child(4) {
  width: 96px;
}

.fiscal-receipt-table th:nth-child(5),
.fiscal-receipt-table td:nth-child(5) {
  width: 72px;
}

.fiscal-receipt-table th:nth-child(6),
.fiscal-receipt-table td:nth-child(6),
.fiscal-receipt-table th:nth-child(7),
.fiscal-receipt-table td:nth-child(7) {
  width: 104px;
}

.fiscal-receipt-table th:last-child,
.fiscal-receipt-table td:last-child {
  position: static;
  right: auto;
  z-index: auto;
  width: 112px;
  min-width: 112px;
  max-width: none;
  box-shadow: none;
}

.fiscal-receipt-table .name-cell,
.fiscal-receipt-table .name-cell strong,
.fiscal-receipt-table .name-cell small {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.fiscal-receipt-table td:nth-child(2).name-cell strong {
  display: block;
  margin-bottom: 3px;
  font-size: 13px;
  line-height: 1.12;
}

.fiscal-receipt-table td:nth-child(2).name-cell small {
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.18;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.fiscal-receipt-table .badge {
  max-width: 96px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fiscal-receipt-table .row-actions {
  justify-content: center;
  flex-wrap: nowrap;
}

.fiscal-receipt-table .row-actions button {
  min-width: 0;
  padding-inline: 10px;
}

.fiscal-file-picker {
  display: flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  background: #fff;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
}

.fiscal-file-picker input {
  display: none;
}

.fiscal-key-transfer {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
}

.fiscal-key-transfer input[type="password"] {
  width: 100%;
  min-width: 0;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 8px;
  color: var(--ink);
  background: #fff;
  font-size: 12px;
  line-height: 1.1;
}

.fiscal-key-transfer button {
  width: 100%;
  min-height: 30px;
  padding: 0 9px;
  font-size: 12px;
  line-height: 1.1;
  white-space: nowrap;
}

.inventory-create-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) repeat(3, minmax(160px, 0.8fr)) auto;
  gap: 10px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.inventory-create-panel strong,
.inventory-create-panel small {
  display: block;
}

.inventory-create-panel small {
  color: var(--muted);
  margin-top: 3px;
}

.inventory-create-panel label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.inventory-create-panel select {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 10px;
  color: var(--ink);
  background: #fff;
}

.inventory-window {
  width: min(1220px, calc(100vw - 48px));
}

.inventory-window-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 12px 0;
}

.inventory-window-actions input {
  min-width: 260px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 10px;
}

.inventory-print-select {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.inventory-print-select select {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 10px;
  color: var(--ink);
  background: #fff;
}

.inventory-table {
  min-width: 1420px;
}

.inventory-table input {
  min-width: 92px;
}

.inventory-totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.inventory-totals div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #f8faf7;
}

.inventory-totals small,
.inventory-totals strong {
  display: block;
}

.inventory-totals small {
  color: var(--muted);
  margin-bottom: 4px;
}

.inventory-print-window {
  width: min(900px, calc(100vw - 48px));
}

.inventory-print-toolbar {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin: 10px 0;
}

.inventory-print-section {
  margin-top: 14px;
}

.inventory-print-section h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.inventory-print-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.inventory-print-table th,
.inventory-print-table td {
  border: 1px solid #cfd8cf;
  padding: 10px 12px;
  text-align: left;
}

.inventory-print-table th {
  background: #f8faf7;
  color: var(--muted);
}

.inventory-print-table td:last-child {
  height: 38px;
  min-width: 180px;
  background: #fff;
}

.marketing-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.marketing-summary div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fbfcfa;
}

.marketing-summary span,
.marketing-summary small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.marketing-summary strong {
  display: block;
  margin: 3px 0 2px;
  font-size: 24px;
  line-height: 1;
}

.quality-feedback-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(104px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.quality-feedback-summary div,
.quality-risk-panel > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fbfcfa;
}

.quality-feedback-summary span,
.quality-feedback-summary small,
.quality-risk-panel small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.quality-feedback-summary strong {
  display: block;
  margin: 3px 0 2px;
  font-size: 24px;
  line-height: 1;
}

.quality-risk-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(170px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.quality-risk-panel strong {
  display: block;
  margin-bottom: 8px;
}

.quality-risk-panel span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.quality-risk-panel b {
  color: var(--green);
}

.quality-feedback-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  font-size: 11px;
}

.quality-feedback-table-wrap {
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

.quality-feedback-table th,
.quality-feedback-table td {
  box-sizing: border-box;
  padding: 7px 6px;
  overflow: hidden;
  white-space: normal;
  overflow-wrap: anywhere;
  vertical-align: top;
}

.quality-feedback-table th:nth-child(1),
.quality-feedback-table td:nth-child(1) {
  width: 10%;
}

.quality-feedback-table th:nth-child(2),
.quality-feedback-table td:nth-child(2) {
  width: 19%;
}

.quality-feedback-table th:nth-child(3),
.quality-feedback-table td:nth-child(3) {
  width: 13%;
}

.quality-feedback-table th:nth-child(4),
.quality-feedback-table td:nth-child(4) {
  width: 8%;
}

.quality-feedback-table th:nth-child(5),
.quality-feedback-table td:nth-child(5) {
  width: 18%;
}

.quality-feedback-table th:nth-child(6),
.quality-feedback-table td:nth-child(6) {
  width: 20%;
}

.module-table.quality-feedback-table th:last-child,
.module-table.quality-feedback-table td:last-child {
  position: static;
  right: auto;
  z-index: auto;
  width: 12%;
  min-width: 0;
  max-width: none;
  background: transparent;
  box-shadow: none;
}

.module-table.quality-feedback-table th:last-child {
  background: #f8faf7;
}

.quality-feedback-table .name-cell {
  min-width: 0;
}

.quality-feedback-row.priority-critical td:first-child {
  box-shadow: inset 4px 0 0 #9b341f;
}

.quality-feedback-row.priority-high td:first-child {
  box-shadow: inset 4px 0 0 #e0aa3e;
}

.quality-feedback-row.is-new td {
  background: #fffaf0;
}

.feedback-priority-cell small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
}

.feedback-priority {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  border-radius: 999px;
  padding: 6px 8px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.feedback-priority.critical {
  background: #f7e6de;
  color: #9b341f;
}

.feedback-priority.high {
  background: #f7ead1;
  color: #6e4b0e;
}

.feedback-priority.watch,
.feedback-priority.compensation {
  background: #edf1fb;
  color: #315c9a;
}

.feedback-priority.done {
  background: #f5ebd3;
  color: #5d4818;
}

.feedback-live-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 5px;
  border-radius: 999px;
  padding: 4px 7px;
  background: #9b341f;
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
}

.feedback-check-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.feedback-check-meta span {
  min-width: 0;
  border-radius: 999px;
  padding: 4px 7px;
  background: #eef6f1;
  color: var(--green);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.badge.feedback-compensation-badge {
  color: #315c9a;
  background: #edf1fb;
}

.quality-feedback-table input,
.quality-feedback-table select,
.quality-feedback-table textarea {
  min-width: 0;
  padding-right: 6px;
  padding-left: 6px;
  font-size: 11px;
}

.quality-feedback-table textarea {
  min-height: 44px;
  resize: vertical;
}

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

.quality-feedback-card {
  display: grid;
  grid-template-columns: minmax(96px, 128px) minmax(0, 1fr) minmax(168px, 190px);
  gap: 12px;
  align-items: start;
  border: 1px solid var(--line);
  border-left: 4px solid #d8e1da;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.quality-feedback-card.priority-critical {
  border-left-color: #9b341f;
}

.quality-feedback-card.priority-high {
  border-left-color: #e0aa3e;
}

.quality-feedback-card.is-new {
  background: #fffaf0;
}

.quality-feedback-card-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.quality-feedback-card-head {
  display: grid;
  grid-template-columns: minmax(190px, 1.15fr) minmax(160px, 0.9fr) minmax(86px, 104px);
  gap: 10px;
  align-items: start;
}

.quality-feedback-card .name-cell {
  min-width: 0;
}

.quality-feedback-card .name-cell strong,
.quality-feedback-card .name-cell small {
  display: block;
}

.quality-feedback-editor-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(300px, 1.15fr);
  gap: 10px;
  min-width: 0;
}

.quality-feedback-card input,
.quality-feedback-card select,
.quality-feedback-card textarea {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 8px;
  color: var(--ink);
  background: #fff;
  font-size: 12px;
}

.quality-feedback-card input,
.quality-feedback-card select {
  min-height: 34px;
}

.quality-feedback-card textarea {
  min-height: 76px;
  padding-top: 7px;
  padding-bottom: 7px;
  line-height: 1.35;
  resize: vertical;
}

.quality-feedback-rating-cell {
  display: grid;
  gap: 6px;
  align-content: start;
}

.quality-feedback-table td small,
.quality-feedback-table .name-cell small,
.quality-feedback-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
}

.quality-feedback-note {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.feedback-action-log {
  display: grid;
  gap: 4px;
  border-top: 1px solid var(--line);
  padding-top: 6px;
}

.feedback-action-log span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.25;
}

.feedback-action-log b {
  margin-right: 5px;
  color: var(--green);
}

.feedback-rating {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 5px;
  border-radius: 999px;
  padding: 5px 4px;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 800;
}

.feedback-rating.low {
  background: #f7e6de;
  color: #9b341f;
}

.quality-feedback-actions-cell {
  vertical-align: top;
  min-width: 0;
}

.quality-feedback-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  width: 100%;
  min-width: 0;
}

.quality-feedback-actions button {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 0 6px;
  font-size: 11px;
  line-height: 1.1;
}

#crm .module-action-bar {
  justify-content: flex-start;
  overflow: visible;
  flex-wrap: wrap;
}

#crm .module-action-bar .badge {
  white-space: normal;
}

@media (max-width: 1180px) {
  .quality-feedback-card {
    grid-template-columns: minmax(90px, 116px) minmax(0, 1fr);
  }

  .quality-feedback-actions-cell {
    grid-column: 2;
  }

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

@media (max-width: 860px) {
  .quality-feedback-summary,
  .quality-risk-panel,
  .quality-feedback-card,
  .quality-feedback-card-head,
  .quality-feedback-editor-grid {
    grid-template-columns: 1fr;
  }

  .quality-feedback-actions-cell {
    grid-column: auto;
  }

  .quality-feedback-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.table-actions {
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 5px;
}

.table-actions button {
  min-height: 30px;
  padding: 0 8px;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 8px;
  min-width: 560px;
}

.permission-group {
  display: grid;
  gap: 6px;
}

.permission-group strong {
  font-size: 12px;
  color: var(--muted);
}

.permission-group > div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.permission-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.permission-chip input {
  width: 14px;
  height: 14px;
}

.inline-pair {
  display: grid;
  grid-template-columns: minmax(72px, 0.85fr) minmax(72px, 0.75fr);
  gap: 6px;
  align-items: center;
}

.link-cell {
  width: 100%;
  min-height: 0;
  border: 0;
  padding: 0;
  text-align: left;
  color: inherit;
  background: transparent;
  box-shadow: none;
}

.link-cell:hover strong {
  color: var(--accent);
}

.media-link-cell {
  display: grid;
  grid-template-columns: 42px minmax(150px, 1fr);
  gap: 9px;
  align-items: center;
}

.media-link-cell .dish-thumb {
  width: 42px;
  height: 42px;
  border-radius: 6px;
}

.image-upload-field {
  display: grid;
  gap: 6px;
}

.image-upload-preview {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 74px;
  border: 1px dashed #aebaae;
  border-radius: 8px;
  padding: 0;
  color: #0c5449;
  background-color: #edf5f1;
  background-position: center;
  background-size: cover;
  overflow: hidden;
}

.image-upload-preview:hover {
  border-color: var(--accent);
}

.image-upload-preview span {
  padding: 4px 7px;
  border-radius: 999px;
  color: #fff;
  background: rgba(20, 107, 93, 0.82);
  font-size: 11px;
  font-weight: 800;
}

.image-upload-preview.empty span {
  color: #0c5449;
  background: transparent;
  font-size: 18px;
}

.image-upload-preview.square {
  width: 52px;
  height: 52px;
  min-height: 52px;
}

.image-url-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  gap: 6px;
}

.image-url-row button {
  min-height: 34px;
}

.compact-image-upload {
  display: grid;
  grid-template-columns: 96px minmax(112px, 1fr);
  align-items: center;
  width: 222px;
  gap: 6px;
}

.compact-image-upload .image-upload-preview {
  width: 96px;
  min-height: 54px;
  height: 54px;
}

.compact-image-upload .image-url-row {
  grid-template-columns: minmax(72px, 1fr) 48px;
}

.compact-image-upload .image-url-row input {
  min-width: 0;
}

.warehouse-transfer-panel {
  display: grid;
  grid-template-columns: minmax(170px, 1.3fr) minmax(140px, 1fr) minmax(140px, 1fr) 110px auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.warehouse-transfer-panel label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.stock-transfer-window {
  width: min(1240px, calc(100vw - 48px));
}

.workspace-window-backdrop .stock-transfer-window,
.workspace-window-backdrop .stock-document-window,
.workspace-window-backdrop .stock-document-print-window,
.workspace-window-backdrop .inventory-window {
  width: 100%;
}

.stock-transfer-route {
  display: grid;
  grid-template-columns: repeat(8, minmax(106px, 1fr));
  gap: 8px;
  align-items: end;
  padding: 8px 14px 6px;
}

.stock-transfer-route label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.stock-transfer-route input,
.stock-transfer-route select {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 10px;
  color: var(--ink);
  background: #fff;
}

.route-summary {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  background: #fff;
}

.route-summary strong,
.route-summary span {
  display: block;
}

.route-summary strong {
  font-size: 17px;
}

.route-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.stock-transfer-window .filter-bar {
  margin: 0 16px 12px;
}

.stock-transfer-table {
  margin: 0 14px;
}

.stock-transfer-table .module-table {
  min-width: 1120px;
}

.stock-document-print-window {
  background: #f3f5ef;
}

.stock-print-toolbar {
  display: flex;
  flex: 0 0 auto;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.stock-document-print-sheet {
  width: min(920px, calc(100% - 32px));
  margin: 18px auto;
  padding: 28px;
  color: #17231b;
  background: #fff;
  border: 1px solid #d9e2d8;
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(31, 42, 34, 0.12);
}

.stock-print-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  padding-bottom: 18px;
  border-bottom: 2px solid #17231b;
}

.stock-print-head small,
.stock-print-meta span,
.stock-print-total span {
  display: block;
  color: #617064;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.stock-print-head h2 {
  margin: 6px 0 4px;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: 0;
}

.stock-print-head p {
  margin: 0;
  color: #344238;
  font-weight: 700;
}

.stock-print-stamp {
  min-width: 122px;
  padding: 10px 14px;
  border: 2px solid #17231b;
  border-radius: 6px;
  text-align: center;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.stock-print-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.stock-print-meta div {
  min-height: 58px;
  padding: 10px;
  border: 1px solid #dfe7db;
  border-radius: 6px;
  background: #f8faf7;
}

.stock-print-meta strong {
  display: block;
  margin-top: 5px;
  font-size: 14px;
  line-height: 1.25;
}

.stock-print-comment {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid #dfe7db;
  border-radius: 6px;
  background: #fbfcfa;
}

.stock-print-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.stock-print-table th,
.stock-print-table td {
  padding: 9px 8px;
  border: 1px solid #d6dfd4;
  text-align: left;
  vertical-align: top;
}

.stock-print-table th {
  color: #344238;
  background: #edf2eb;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.stock-print-table td:first-child,
.stock-print-table th:first-child {
  width: 34px;
  text-align: center;
}

.stock-print-table small {
  display: block;
  margin-top: 3px;
  color: #617064;
  font-size: 11px;
}

.stock-print-total {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.stock-print-total div {
  min-width: 138px;
  padding: 10px 12px;
  border: 1px solid #dfe7db;
  border-radius: 6px;
  background: #f8faf7;
}

.stock-print-total .grand {
  color: #fff;
  background: #17231b;
  border-color: #17231b;
}

.stock-print-total .grand span {
  color: rgba(255, 255, 255, 0.72);
}

.stock-print-total strong {
  display: block;
  margin-top: 5px;
  font-size: 18px;
}

.stock-print-signatures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-top: 42px;
}

.stock-print-signatures span {
  display: block;
  height: 32px;
  border-bottom: 1px solid #17231b;
}

.stock-print-signatures strong {
  display: block;
  margin-top: 6px;
  color: #617064;
  font-size: 12px;
  text-align: center;
}

@media print {
  body * {
    visibility: hidden !important;
  }

  .stock-print-backdrop,
  .stock-print-backdrop *,
  .stock-document-print-window,
  .stock-document-print-window *,
  .stock-document-print-sheet,
  .stock-document-print-sheet * {
    visibility: visible !important;
  }

  .no-print,
  .stock-print-toolbar,
  .stock-document-print-window > .function-window-head {
    display: none !important;
  }

  .stock-print-backdrop {
    position: static !important;
    inset: auto !important;
    display: block !important;
    padding: 0 !important;
    background: #fff !important;
  }

  .stock-document-print-window {
    position: static !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
  }

  .stock-document-print-sheet {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .stock-print-table th,
  .stock-print-table td {
    break-inside: avoid;
  }
}

.stock-transfer-table .module-table th:last-child,
.stock-transfer-table .module-table td:last-child {
  width: 54px;
  text-align: center;
}

.stock-transfer-table td:nth-child(3),
.stock-transfer-table td:nth-child(4),
.stock-transfer-table td:nth-child(5),
.stock-transfer-table td:nth-child(6),
.stock-transfer-table td:nth-child(7) {
  width: 140px;
}

.stock-transfer-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.price-input-wrap {
  display: grid;
  grid-template-columns: minmax(96px, 1fr) 28px;
  gap: 6px;
  align-items: center;
}

.price-trend {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  cursor: help;
}

.price-trend.up {
  color: #a93832;
  border-color: #e3b7b3;
  background: #f8e5e3;
}

.price-trend.down {
  color: #0e6b51;
  border-color: #b9d9cb;
  background: #e2f0ea;
}

.price-trend.same,
.price-trend.muted {
  color: var(--muted);
  background: #f2f4ef;
}

.supply-add-row td {
  position: relative;
  background: #f7f9f5;
}

.supply-search-cell {
  position: relative;
}

.supply-search-cell input {
  min-width: 360px;
}

.supply-suggestions {
  position: absolute;
  z-index: 5;
  top: calc(100% + 6px);
  left: 0;
  width: min(620px, 80vw);
  max-height: 240px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.supply-suggestions button {
  width: 100%;
  min-height: 52px;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 10px;
  align-items: center;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  text-align: left;
  background: #fff;
}

.supply-suggestions button:hover {
  background: var(--green-soft);
}

.supply-suggestions span,
.supply-suggestions strong,
.supply-suggestions small {
  display: block;
}

.supply-suggestions em {
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}

.supply-total-panel {
  margin: 8px 14px 0;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  padding: 10px;
}

.stock-transfer-window .recipe-editor-actions {
  position: sticky;
  bottom: 0;
  margin-top: 0;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  background: var(--panel);
}

.category-icon-upload {
  width: 74px;
}

.category-icon-upload input {
  min-width: 0;
  text-align: center;
}

.category-admin-row td {
  height: 54px;
  vertical-align: middle;
}

.category-admin-row .name-cell {
  min-width: 210px;
}

.category-icon-cell {
  width: 72px;
  text-align: center;
}

.category-icon-preview {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f7faf6;
  font-size: 17px;
}

.category-image-cell {
  width: 100px;
}

.category-admin-row td:nth-child(4) {
  width: 100px;
}

.category-admin-row td:nth-child(5),
.category-admin-row td:nth-child(6) {
  width: 90px;
  text-align: center;
}

.category-admin-row td:nth-child(7) {
  width: 112px;
}

.category-admin-row .row-actions {
  width: 148px;
  justify-content: center;
  flex-wrap: nowrap;
}

.category-admin-row .row-actions button {
  min-width: 0;
  min-height: 32px;
  height: 32px;
  padding: 0 8px;
  font-size: 11px;
}

.workshop-admin-row td {
  height: 54px;
  vertical-align: middle;
}

.workshop-admin-row .name-cell {
  min-width: 210px;
}

.workshop-admin-row td:nth-child(2) {
  width: 70px;
  text-align: center;
}

.workshop-admin-row td:nth-child(3) {
  width: 156px;
}

.workshop-admin-row td:nth-child(4) {
  width: 124px;
}

.workshop-admin-row td:nth-child(5) {
  width: 112px;
}

.module-table .workshop-admin-row .row-actions {
  justify-content: center;
  flex-wrap: nowrap;
  width: 148px;
}

.module-table .workshop-admin-row .row-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 32px;
  height: 32px;
  padding: 0 8px;
  font-size: 11px;
  line-height: 1.1;
}

.workshop-admin-row input,
.workshop-admin-row select {
  min-height: 34px;
}

.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.row-actions button {
  min-height: 30px;
  padding: 0 9px;
  font-size: 12px;
}

.module-table.platform-tenant-table {
  width: 100%;
  min-width: 1080px;
  table-layout: fixed;
}

.platform-tenant-table th:nth-child(1),
.platform-tenant-table td:nth-child(1) {
  width: 190px;
  max-width: 190px;
}

.platform-tenant-table th:nth-child(2),
.platform-tenant-table td:nth-child(2) {
  width: 210px;
  max-width: 210px;
}

.platform-tenant-table th:nth-child(3),
.platform-tenant-table td:nth-child(3) {
  width: 120px;
  max-width: 120px;
}

.platform-tenant-table th:nth-child(4),
.platform-tenant-table td:nth-child(4) {
  width: 70px;
  max-width: 70px;
}

.platform-tenant-table th:nth-child(5),
.platform-tenant-table td:nth-child(5) {
  width: 88px;
  max-width: 88px;
}

.platform-tenant-table th:nth-child(6),
.platform-tenant-table td:nth-child(6) {
  width: 112px;
  max-width: 112px;
}

.platform-tenant-table th:nth-child(7),
.platform-tenant-table td:nth-child(7) {
  width: 122px;
  max-width: 122px;
}

.module-table.platform-tenant-table th:last-child,
.module-table.platform-tenant-table td:last-child {
  width: 218px;
  min-width: 218px;
  max-width: 218px;
}

.platform-tenant-table td:not(:last-child) {
  overflow: hidden;
  text-overflow: ellipsis;
}

.module-table .platform-tenant-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 4px;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.module-table .platform-tenant-actions button {
  min-width: 0;
  min-height: 28px;
  padding: 0 5px;
  overflow: hidden;
  font-size: 11px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-table.platform-invoice-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.platform-invoice-table th,
.platform-invoice-table td {
  padding: 8px 10px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.platform-invoice-table th:nth-child(1),
.platform-invoice-table td:nth-child(1) {
  width: 18%;
}

.platform-invoice-table th:nth-child(2),
.platform-invoice-table td:nth-child(2) {
  width: 15%;
}

.platform-invoice-table th:nth-child(3),
.platform-invoice-table td:nth-child(3) {
  width: 18%;
}

.platform-invoice-table th:nth-child(4),
.platform-invoice-table td:nth-child(4) {
  width: 12%;
}

.platform-invoice-table th:nth-child(5),
.platform-invoice-table td:nth-child(5) {
  width: 14%;
}

.platform-invoice-table th:nth-child(6),
.platform-invoice-table td:nth-child(6) {
  width: 13%;
}

.module-table.platform-invoice-table th:last-child,
.module-table.platform-invoice-table td:last-child {
  width: 118px;
  min-width: 118px;
  max-width: 118px;
}

.module-table .platform-invoice-actions {
  justify-content: center;
  width: 100%;
  min-width: 0;
}

.module-table .platform-invoice-actions button {
  width: 100%;
  min-width: 0;
  padding: 0 8px;
}

body.view-platform .rail,
body.view-platform .topbar,
body.billing-admin-shell .rail,
body.billing-admin-shell .topbar {
  display: none;
}

body.view-platform .app,
body.billing-admin-shell .app {
  display: block;
  min-height: 100vh;
  overflow: hidden;
}

body.view-platform .main,
body.billing-admin-shell .main {
  height: 100vh;
  overflow: auto;
}

body.view-platform #platform.view.active,
body.billing-admin-shell #platform.view.active {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 16px;
  min-height: 100vh;
  padding: 16px;
}

.billing-admin-sidebar {
  position: sticky;
  top: 16px;
  grid-column: 1;
  grid-row: 1 / 4;
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: calc(100vh - 32px);
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcf8;
}

.billing-admin-brand {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.billing-admin-brand strong,
.billing-admin-brand small,
.billing-admin-foot strong,
.billing-admin-foot small {
  display: block;
}

.billing-admin-brand small,
.billing-admin-foot small {
  color: var(--muted);
  font-size: 12px;
}

.billing-admin-logo {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  color: #fff;
  background: #101712;
  font-weight: 900;
}

.billing-admin-sidebar nav {
  display: grid;
  gap: 6px;
}

.billing-admin-sidebar nav button {
  justify-content: flex-start;
  width: 100%;
  border-color: transparent;
  padding: 0 10px;
  color: #33413a;
  background: transparent;
  text-align: left;
}

.billing-admin-sidebar nav button.active {
  color: var(--accent);
  border-color: #dcece6;
  background: var(--green-soft);
  font-weight: 800;
}

.billing-admin-foot {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.billing-admin-hero {
  grid-column: 2;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  background: #fff;
}

.billing-admin-hero .billing-admin-logo {
  width: 52px;
  height: 52px;
}

.billing-admin-hero span,
.billing-admin-hero p {
  color: var(--muted);
}

.billing-admin-hero h1 {
  margin: 2px 0;
  font-size: 24px;
}

body.view-platform #platform > .kpi-grid,
body.billing-admin-shell #platform > .kpi-grid,
body.view-platform #platform > .platform-content-grid,
body.billing-admin-shell #platform > .platform-content-grid {
  grid-column: 2;
}

body.view-platform #platform > .kpi-grid,
body.billing-admin-shell #platform > .kpi-grid {
  grid-template-columns: repeat(4, minmax(120px, 1fr));
}

body.view-platform #platform > .platform-content-grid,
body.billing-admin-shell #platform > .platform-content-grid {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

body.view-platform #platform .wide,
body.billing-admin-shell #platform .wide {
  grid-column: auto;
}

#platform .platform-section-panel[hidden] {
  display: none !important;
}

body.view-platform #platform .platform-section-panel,
body.billing-admin-shell #platform .platform-section-panel {
  min-height: min(640px, calc(100vh - 238px));
}

.billing-row-actions {
  justify-content: flex-end;
}

@media (max-width: 900px) {
  body.view-platform #platform.view.active,
  body.billing-admin-shell #platform.view.active {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    padding: 10px;
  }

  .billing-admin-sidebar,
  .billing-admin-hero,
  body.view-platform #platform > .kpi-grid,
  body.billing-admin-shell #platform > .kpi-grid,
  body.view-platform #platform > .platform-content-grid,
  body.billing-admin-shell #platform > .platform-content-grid {
    grid-column: 1;
  }

  .billing-admin-sidebar {
    position: static;
    grid-row: auto;
    height: auto;
  }

  .billing-admin-sidebar nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.view-platform #platform > .kpi-grid,
  body.billing-admin-shell #platform > .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.row-actions button[data-full-label] {
  position: relative;
  justify-content: center;
  overflow: hidden;
  transition: min-width 0.16s ease, width 0.16s ease, padding 0.16s ease;
}

.row-actions button[data-full-label]:hover,
.row-actions button[data-full-label]:focus-visible {
  min-width: 92px;
}

.row-actions button[data-full-label]:hover,
.row-actions button[data-full-label]:focus-visible {
  font-size: 0;
}

.row-actions button[data-full-label]:hover::after,
.row-actions button[data-full-label]:focus-visible::after {
  content: attr(data-full-label);
  font-size: 11px;
  line-height: 1;
}

.empty-cell {
  color: var(--muted);
  text-align: center;
}

.warn-badge {
  color: #7c2d26;
  background: #f8ddd9;
}

.fiscal-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(32, 48, 43, 0.2);
  vertical-align: middle;
}

.fiscal-ok {
  background: #10b981;
  box-shadow: 0 0 0 1px #047857, 0 0 0 4px rgba(16, 185, 129, 0.18);
}

.fiscal-queued {
  background: #f59e0b;
  box-shadow: 0 0 0 1px #b45309, 0 0 0 4px rgba(245, 158, 11, 0.18);
}

.fiscal-error {
  background: #ef4444;
  box-shadow: 0 0 0 1px #b91c1c, 0 0 0 4px rgba(239, 68, 68, 0.16);
}

.editable-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) 96px 112px 130px auto;
  align-items: end;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.editable-row strong,
.editable-row small {
  display: block;
}

.editable-row small {
  color: var(--muted);
  margin-top: 3px;
}

.editable-row label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.segmented button,
.chip {
  min-height: 30px;
}

.segmented button.active,
.chip.active {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}

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

.category-card {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 8px;
  min-height: 160px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: center;
  overflow: hidden;
}

.category-icon {
  display: grid;
  place-items: center;
  width: 100%;
  height: 86px;
  border-radius: 8px;
  background: #edf5f1;
  color: #0c5449;
  font-size: 30px;
}

.category-photo {
  display: block;
  width: 100%;
  height: 86px;
  border-radius: 8px;
  background-color: #edf5f1;
  background-position: center;
  background-size: cover;
}

.category-card strong {
  font-size: 16px;
}

.category-card small {
  color: var(--muted);
  font-size: 12px;
}

.dish-card {
  display: grid;
  gap: 10px;
  min-height: 138px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: left;
  background: #fff;
}

.dish-card.compact {
  grid-template-columns: 58px 1fr;
  align-items: center;
  gap: 8px;
  min-height: 64px;
  padding: 8px 10px;
}

.dish-card.compact.active {
  border-color: #b8dccd;
  background: #e8f3ef;
}

.dish-thumb {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 6px;
  background-color: #edf5f1;
  background-position: center;
  background-size: cover;
  color: #0c5449;
  font-size: 22px;
  font-weight: 800;
}

.dish-card-copy {
  display: grid;
  gap: 3px;
}

.dish-card-copy small {
  color: var(--muted);
  font-size: 12px;
}

.dish-card strong {
  font-size: 15px;
}

.dish-card-copy span {
  color: var(--muted);
  font-size: 12px;
}

.menu-modifier-panel {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: transparent;
}

.menu-modifier-panel:empty {
  display: none;
}

.menu-modifier-panel strong,
.menu-modifier-panel small {
  display: block;
}

.menu-modifier-panel small {
  color: var(--muted);
  margin-top: 2px;
}

.modifier-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(142px, 1fr));
  gap: 6px;
}

.modifier-actions button {
  display: grid;
  gap: 3px;
  min-height: 46px;
  padding: 8px;
  text-align: left;
}

.modifier-actions b {
  color: #0c5449;
}

.pos-modifier-popover {
  width: min(420px, 100%);
  padding: 12px;
  border: 1px solid #b7d7cc;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(17, 35, 29, 0.14);
}

.pos-modifier-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.pos-modifier-head strong,
.pos-modifier-head small {
  display: block;
}

.pos-modifier-head strong {
  margin-top: 5px;
  font-size: 18px;
}

.pos-modifier-head small,
.pos-modifier-actions small {
  color: var(--muted);
}

.pos-modifier-actions {
  grid-template-columns: 1fr;
}

.pos-modifier-actions button {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 50px;
  border-color: #d5ded8;
}

.pos-modifier-actions button small {
  grid-column: 1 / -1;
}

.pos-modifier-actions .primary-soft {
  border-color: #a9d8ca;
  background: #edf7f3;
}

.menu-browser.focus-menu {
  outline: 3px solid rgba(20, 107, 93, 0.24);
  box-shadow: 0 0 0 6px rgba(20, 107, 93, 0.08);
}

.order-panel {
  align-self: start;
}

.pos-table-strip {
  display: none;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.pos-table-strip.visible {
  display: grid;
}

.pos-table-strip button {
  display: grid;
  align-content: center;
  gap: 3px;
  min-height: 54px;
  padding: 6px 8px;
  text-align: left;
  background: #fff;
}

.pos-table-strip button.active {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}

.pos-table-strip button.free {
  border-color: #cfe3db;
}

.pos-table-strip button.busy,
.pos-table-strip button.late {
  border-color: #efdca8;
  background: #fffaf0;
}

.pos-table-strip button.active.busy,
.pos-table-strip button.active.late {
  background: var(--accent);
}

.pos-table-strip strong,
.pos-table-strip span {
  display: block;
}

.pos-table-strip span {
  font-size: 11px;
  color: inherit;
}

.pos-table-window {
  width: min(960px, calc(100vw - 28px));
  max-height: min(760px, calc(100vh - 28px));
}

.pos-table-window-body {
  display: grid;
  gap: 14px;
  padding: 14px;
  border-top: 1px solid var(--line);
  overflow: auto;
}

.pos-table-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 10px;
}

.pos-table-status-grid > div {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbf7;
}

.pos-table-status-grid span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.pos-table-status-grid strong {
  font-size: 22px;
}

.pos-table-form {
  padding: 0;
  border-top: 0;
}

.pos-table-check-list {
  display: grid;
  gap: 10px;
}

.pos-table-check-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 12px;
  text-align: left;
  background: #fff;
}

.pos-table-check-card span,
.pos-table-check-card strong,
.pos-table-check-card small {
  display: block;
}

.pos-table-check-card small {
  margin-top: 4px;
  color: var(--muted);
}

.pos-table-check-card b {
  font-size: 20px;
}

.order-line {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 6px 0;
}

.line-select {
  display: flex;
  align-items: center;
  justify-content: center;
}

.line-select input {
  width: 16px;
  min-height: 16px;
}

.order-line strong,
.order-line small {
  display: block;
}

.order-line small {
  color: var(--muted);
  margin-top: 2px;
  font-size: 12px;
}

.check-ops {
  margin-top: 12px;
}

.pos-hidden-controls {
  display: none !important;
}

.draft-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.draft-check {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfa;
}

.draft-check strong,
.draft-check small {
  display: block;
}

.draft-check small {
  color: var(--muted);
  margin-top: 3px;
}

.check-ops label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

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

.qty button {
  width: 28px;
  min-height: 28px;
  padding: 0;
}

.guest-picker,
.order-context,
.order-adjustments,
.campaign label {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
}

.order-context {
  grid-template-columns: 1fr 1fr;
  margin-top: 0;
  margin-bottom: 12px;
}

.order-adjustments {
  grid-template-columns: 1fr 118px;
  align-items: end;
}

.toggle-line {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  color: var(--ink);
}

.toggle-line input {
  width: 16px;
  min-height: 16px;
}

.guest-summary,
.guest-recommendations,
.stock-warnings {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.guest-search-field {
  display: grid;
  grid-template-columns: 1fr 34px;
  gap: 6px;
}

.guest-search-field button {
  display: none;
  min-height: 38px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
}

.guest-search-field button.visible {
  display: block;
}

.guest-search-results {
  display: grid;
  gap: 6px;
}

.guest-search-results button {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 8px 10px;
  text-align: left;
  background: #fff;
}

.guest-search-results button.active {
  border-color: #b8dccd;
  background: #e8f3ef;
}

.guest-search-results button.is-busy {
  border-color: var(--accent);
  background: #dcece6;
}

.guest-search-results .guest-search-create {
  border-color: #b8dccd;
  background: #f3faf6;
}

.guest-search-results .guest-search-create b {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: #fff;
  background: #147565;
}

.guest-add-btn {
  width: 100%;
  justify-content: center;
  min-height: 40px;
  color: #0c5449;
  border-color: #b8dccd;
  background: #f3faf6;
  font-weight: 800;
}

.guest-add-btn:hover {
  background: #e8f3ef;
}

.guest-search-results strong,
.guest-search-results small,
.guest-summary strong,
.guest-summary span,
.guest-summary b {
  display: block;
}

.guest-search-results small,
.guest-summary span {
  color: var(--muted);
}

.guest-search-results b,
.guest-summary b {
  color: #0c5449;
}

.pos-created-order {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #b8dccd;
  border-radius: 8px;
  background: #f4faf7;
}

body.surface-pos #recentDeliveryOrderPanel,
body.view-pos #recentDeliveryOrderPanel {
  position: fixed;
  left: max(14px, env(safe-area-inset-left));
  right: auto;
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 1150;
  width: min(420px, calc(100vw - 28px));
}

body.surface-pos #recentDeliveryOrderPanel:empty,
body.view-pos #recentDeliveryOrderPanel:empty {
  display: none;
}

body.surface-pos #recentDeliveryOrderPanel .pos-created-order,
body.view-pos #recentDeliveryOrderPanel .pos-created-order {
  margin-top: 0;
  box-shadow: 0 16px 42px rgba(18, 33, 26, 0.16);
}

.pos-created-head {
  display: grid;
  grid-template-columns: 1fr 30px;
  gap: 8px;
  align-items: start;
}

.pos-created-head strong,
.pos-created-head small {
  display: block;
}

.pos-created-head strong {
  margin-top: 4px;
  color: var(--ink);
  font-size: 15px;
}

.pos-created-head small,
.pos-created-status small {
  color: var(--muted);
}

.pos-created-head > button {
  min-height: 30px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
  background: #fff;
}

.pos-created-status {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pos-created-status > div {
  display: grid;
  gap: 2px;
  padding: 8px;
  border: 1px solid #d7e3db;
  border-radius: 8px;
  background: #fff;
}

.pos-created-status span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.pos-created-status strong {
  color: #0c5449;
  font-size: 13px;
}

.pos-created-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.pos-created-actions button {
  min-height: 38px;
  padding: 8px 10px;
}

.guest-recommendations {
  border: 1px solid #b8dccd;
  border-radius: 8px;
  padding: 9px;
  background: #f3faf6;
}

.guest-rec-head strong,
.guest-rec-head small,
.guest-rec-line span,
.guest-rec-line b {
  display: block;
}

.guest-rec-head strong {
  color: var(--ink);
  font-size: 13px;
}

.guest-rec-head small {
  margin-top: 2px;
  line-height: 1.35;
}

.guest-rec-line {
  display: grid;
  gap: 2px;
  border-top: 1px solid #d9e7df;
  padding-top: 7px;
}

.guest-rec-line span {
  font-weight: 800;
}

.guest-rec-line b {
  color: #0c5449;
  line-height: 1.35;
}

.guest-rec-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 6px;
}

.guest-rec-actions button {
  display: grid;
  gap: 2px;
  min-height: 58px;
  padding: 8px;
  text-align: left;
  background: #fff;
}

.guest-rec-actions button span,
.guest-rec-actions button small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.guest-rec-actions button strong {
  color: var(--ink);
  line-height: 1.15;
}

.stock-warnings {
  margin-top: 10px;
}

.stock-warnings span {
  display: block;
  padding: 8px 10px;
  border: 1px solid #e8b5ad;
  border-radius: 7px;
  color: #7f2821;
  background: #fff7f5;
}

.totals {
  display: grid;
  gap: 8px;
  margin: 16px 0;
}

.totals div,
.finance-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.grand {
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 18px;
}

.pay-actions {
  display: grid;
  grid-template-columns: 1fr 86px 1fr;
  gap: 10px;
}

.pay-actions.remote-order-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pay-actions.remote-order-actions #payBtn {
  display: none;
}

.pay-actions.remote-order-actions #createDeliveryOrderBtn {
  grid-column: auto;
  min-width: 0;
  white-space: normal;
}

.pay-actions.remote-order-actions #cashOnPickupBtn {
  min-width: 0;
  white-space: normal;
  border-color: var(--green);
  background: var(--green);
  color: #fff;
  font-weight: 800;
}

.pay-actions.remote-order-actions #deleteRemoteOrderBtn {
  min-width: 0;
  white-space: nowrap;
}

body.surface-pos #pos.pos-check-open-mode .pay-actions.remote-order-actions,
body.view-pos #pos.pos-check-open-mode .pay-actions.remote-order-actions {
  position: static;
  z-index: auto;
  margin-bottom: max(28px, calc(18px + env(safe-area-inset-bottom)));
  padding: 0 0 max(14px, env(safe-area-inset-bottom));
  background: transparent;
}

body.surface-pos #pos.pos-check-open-mode .order-panel,
body.view-pos #pos.pos-check-open-mode .order-panel {
  padding-bottom: max(190px, calc(150px + env(safe-area-inset-bottom)));
  scroll-padding-bottom: max(190px, calc(150px + env(safe-area-inset-bottom)));
}

body.android-asset-app.surface-pos #pos.pos-check-open-mode .order-panel,
body.android-asset-app.view-pos #pos.pos-check-open-mode .order-panel {
  padding-bottom: calc(190px + var(--app-bottom-safe));
  scroll-padding-bottom: calc(210px + var(--app-bottom-safe));
}

body.android-asset-app.surface-pos #pos.pos-check-open-mode .pos-checkout-stack,
body.android-asset-app.view-pos #pos.pos-check-open-mode .pos-checkout-stack,
body.android-asset-app.surface-pos #pos.pos-check-open-mode .order-panel > .pay-actions,
body.android-asset-app.view-pos #pos.pos-check-open-mode .order-panel > .pay-actions {
  margin-bottom: calc(16px + var(--app-bottom-safe));
}

.receipt-preview {
  display: none;
  max-height: 220px;
  overflow: auto;
  margin: 14px 0 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  white-space: pre-wrap;
}

.receipt-preview.show {
  display: block;
}

.receipt-preview-dialog {
  max-height: min(260px, 32vh);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.35;
}

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

.receipt-channel-grid div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.receipt-channel-grid span,
.receipt-channel-grid small {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-weight: 800;
}

.receipt-channel-grid strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
}

.pos-payment-backdrop {
  align-items: center;
  padding: 20px;
}

.pos-payment-window {
  width: min(720px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
}

.client-editor-backdrop {
  align-items: center;
  padding: 20px;
}

.client-editor-window {
  width: min(760px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
}

.client-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border-top: 1px solid var(--line);
  overflow: auto;
}

.client-editor-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.client-editor-wide {
  grid-column: 1 / -1;
}

.required-mark {
  color: #bf4b3c;
}

.client-editor-actions {
  border-top: 1px solid var(--line);
}

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

.payment-summary-grid div,
.change-due,
.cash-received-field,
.payment-phone-field {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.payment-summary-grid span,
.change-due span {
  display: block;
  color: var(--muted);
  font-weight: 700;
}

.payment-summary-grid strong,
.change-due strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
}

.cash-received-field,
.payment-phone-field {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-weight: 800;
}

.cash-received-field input,
.payment-phone-field input {
  width: 100%;
  font-size: 26px;
  font-weight: 900;
}

.change-due {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.change-due.positive strong {
  color: var(--green);
}

.change-due.warn strong {
  color: #a23a3a;
}

.pos-fiscal-live {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.pos-fiscal-live.done {
  border-color: #b8ded1;
  background: #f3fbf7;
}

.pos-fiscal-live.sending {
  border-color: #cbd7e8;
  background: #f5f8fd;
}

.pos-fiscal-live.warn {
  border-color: #ead0a5;
  background: #fff9ee;
}

.pos-fiscal-live span,
.pos-fiscal-live small {
  color: var(--muted);
  font-weight: 800;
}

.pos-fiscal-live strong {
  color: var(--ink);
  font-size: 18px;
}

.pos-fiscal-live button {
  justify-self: start;
  min-height: 34px;
  padding: 7px 11px;
}

.receipt-choice-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.receipt-choice-actions button {
  min-width: 150px;
}

.table-map {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.table-card {
  min-height: 118px;
}

.table-card strong {
  display: block;
  font-size: 22px;
}

.table-card.free {
  background: #f3faf5;
}

.table-card.busy {
  border-color: #b8cfe9;
  background: #f3f7fc;
}

.table-card.late {
  border-color: #e8b5ad;
  background: #fff7f5;
}

.booking-window {
  min-height: min(720px, 100%);
}

.booking-window-body {
  display: grid;
  gap: 14px;
  padding: 14px;
  border-top: 1px solid var(--line);
  overflow: auto;
}

.booking-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  padding: 14px;
  border-top: 1px solid var(--line);
  overflow: auto;
}

.booking-form-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.booking-form-grid .wide {
  grid-column: span 2;
}

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

.booking-table-summary > div {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbf8;
}

.booking-table-summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

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

.booking-list.compact {
  gap: 8px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.campaign {
  display: grid;
  gap: 10px;
}

.crm-profile-panel {
  grid-column: 2;
}

.guest-profile {
  display: grid;
  gap: 10px;
}

.guest-profile-window {
  gap: 12px;
}

.guest-profile-detail {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(260px, 0.32fr);
  gap: 14px;
  padding: 14px;
  border-top: 1px solid var(--line);
}

.guest-profile-main,
.guest-profile-side {
  display: grid;
  align-content: start;
  gap: 12px;
}

.profile-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
}

.profile-metrics div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.profile-metrics span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.result-box {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
}

.online-site-payment-warning {
  display: grid;
  gap: 4px;
  border-color: #efc7a5;
  color: #7a3d15;
  background: #fff6ed;
}

.online-site-payment-warning strong {
  color: #5f2d0d;
}

.communication-architecture {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 12px;
}

.communication-architecture > div,
.communication-provider-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.settings-communication-note > div {
  background: #f7fbf8;
}

.communication-architecture strong,
.communication-provider-card strong {
  color: var(--ink);
}

.communication-architecture p,
.communication-provider-card p,
.communication-provider-card small,
.communication-provider-card span,
.communication-provider-hint span,
.communication-provider-hint small {
  display: block;
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.35;
}

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

.communication-provider-card {
  display: grid;
  gap: 6px;
  background: #fbfdfb;
}

.communication-provider-card.enabled {
  border-color: #b8dccd;
  background: #f1faf6;
}

.communication-provider-card > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.communication-provider-hint {
  align-self: stretch;
}

.ai-stock-advice {
  display: grid;
  gap: 10px;
  border: 1px solid #b8dccd;
  border-radius: 8px;
  padding: 12px;
  background: #f3faf6;
}

.ai-stock-advice p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.ai-stock-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 8px;
}

.ai-stock-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
}

.ai-stock-grid span,
.ai-stock-grid small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.ai-stock-grid strong {
  display: block;
  margin: 2px 0;
  font-size: 22px;
}

.ai-stock-list {
  display: grid;
  gap: 7px;
}

.ai-stock-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 92px minmax(120px, auto);
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
}

.ai-stock-row strong,
.ai-stock-row small {
  display: block;
}

.ai-stock-row small {
  color: var(--muted);
  margin-top: 2px;
}

.ai-stock-row span {
  justify-self: start;
  border-radius: 999px;
  padding: 5px 9px;
  color: #6b4a00;
  background: #f4ead1;
  font-size: 12px;
  font-weight: 800;
}

.ai-stock-row.critical span,
.ai-stock-row.urgent span {
  color: #7d2119;
  background: #f4d8d5;
}

.ai-stock-row.ok span {
  color: #0c5449;
  background: #dcefe8;
}

.ai-stock-row b {
  text-align: right;
}

.cashflow-advice {
  display: grid;
  gap: 10px;
  border: 1px solid #d8cfb0;
  border-radius: 8px;
  padding: 12px;
  background: #fbf8ef;
}

.cashflow-advice p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.cashflow-advice-list {
  display: grid;
  gap: 7px;
}

.cashflow-advice-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
}

.cashflow-advice-row strong,
.cashflow-advice-row small {
  display: block;
}

.cashflow-advice-row small {
  color: var(--muted);
  margin-top: 2px;
}

.import-data-panel {
  display: grid;
  min-width: 0;
  gap: 12px;
  border: 1px solid #b8dccd;
  border-radius: 8px;
  padding: 14px;
  overflow: hidden;
  background: #f3faf6;
}

.import-data-panel .panel-head {
  height: auto;
  min-height: 38px;
  flex-wrap: wrap;
  align-items: flex-start;
  margin: 0;
}

.import-data-panel p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.import-data-panel .badge {
  max-width: 100%;
  min-width: 0;
  height: auto;
  padding: 6px 10px;
  line-height: 1.15;
  text-align: left;
  white-space: normal;
}

.import-data-drop {
  display: grid;
  min-width: 0;
  gap: 4px;
  min-height: 82px;
  border: 1px dashed #8ebcab;
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  cursor: pointer;
}

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

.import-data-drop strong,
.import-data-drop small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.import-data-drop small {
  color: var(--muted);
  font-size: 12px;
}

.import-data-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 8px;
}

.import-data-stats div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
}

.import-data-stats span,
.import-data-stats strong {
  display: block;
}

.import-data-stats span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.import-data-stats strong {
  margin-top: 2px;
  font-size: 20px;
}

.import-data-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: stretch;
}

.import-data-actions button {
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  line-height: 1.1;
  white-space: normal;
}

.import-data-actions .badge {
  justify-content: center;
  text-align: center;
}

.import-live-status {
  display: grid;
  gap: 16px;
  margin: 12px 0;
  padding: 20px;
  border: 1px solid #b8dccd;
  border-radius: 46px;
  background: linear-gradient(135deg, #f3faf6 0%, #cfe5dd 100%);
  box-shadow: 4px 4px 16px rgba(28, 40, 32, 0.06);
}

.import-live-status > div:first-child {
  display: grid;
  align-content: center;
  padding: 0;
}

.import-live-status > div:first-child strong,
.import-live-status > div:first-child small {
  display: block;
}

.import-live-status > div:first-child small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.import-live-status-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(74px, 1fr));
  gap: 8px;
}

.import-live-status-grid span {
  display: grid;
  gap: 2px;
  min-height: 58px;
  align-content: center;
  padding: 9px 20px;
  border: 0.5px solid #b8dccd;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.8);
}

.import-live-status-grid b,
.import-live-status-grid small {
  display: block;
}

.import-live-status-grid b {
  font-size: 20px;
}

.import-live-status-grid small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.cashflow-advice-row span {
  color: #6b4a00;
  font-weight: 800;
}

.finance-accounts-panel {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.finance-transaction-form {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(170px, 1fr) minmax(130px, 0.7fr) minmax(170px, 1fr) minmax(110px, 0.6fr) minmax(180px, 1fr) auto;
  gap: 8px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.finance-transaction-launcher {
  grid-template-columns: minmax(280px, 1fr) auto;
  align-items: center;
}

.finance-transaction-launcher strong,
.finance-transaction-launcher small {
  display: block;
}

.finance-transaction-launcher small {
  margin-top: 4px;
  color: var(--muted);
}

.finance-operation-window {
  width: min(1120px, calc(100vw - 32px));
}

.finance-operation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
  padding: 18px 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.finance-operation-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.finance-operation-grid input,
.finance-operation-grid select,
.finance-operation-grid textarea {
  width: 100%;
}

.finance-operation-grid textarea,
.finance-operation-grid .finance-checkline {
  grid-column: span 2;
}

.finance-checkline {
  grid-template-columns: auto 1fr;
  align-items: center;
  align-self: end;
  min-height: 54px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9f5;
  color: var(--ink);
  font-size: 14px;
}

.finance-checkline input {
  width: auto;
}

.finance-recurring-panel {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.finance-recurring-list {
  display: grid;
  gap: 8px;
}

.finance-recurring-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 130px 130px auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9f5;
}

.finance-recurring-row strong,
.finance-recurring-row small {
  display: block;
}

.finance-recurring-row small {
  margin-top: 3px;
  color: var(--muted);
}

.finance-recurring-row > span {
  color: var(--ink);
  font-weight: 800;
}

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

.account-summary-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #f7f9f5;
}

.account-summary-grid small,
.account-summary-grid strong {
  display: block;
}

.account-summary-grid small {
  margin-bottom: 4px;
  color: var(--muted);
}

.account-summary-grid strong {
  font-size: 20px;
}

.account-transfer-panel {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) minmax(120px, 0.6fr) minmax(180px, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.finance-transaction-form label,
.account-transfer-panel label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.finance-transaction-form input,
.finance-transaction-form select,
.account-transfer-panel input,
.account-transfer-panel select {
  width: 100%;
}

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

.pnl-summary div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
}

.pnl-summary small,
.pnl-summary strong,
.pnl-summary span {
  display: block;
}

.pnl-summary small {
  color: var(--muted);
  font-weight: 800;
}

.pnl-summary strong {
  margin-top: 4px;
  font-size: 20px;
}

.pnl-summary span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.module-table tr.pnl-section td {
  background: #f3faf6;
  font-weight: 900;
}

.module-table tr.pnl-subtotal td {
  background: #f7f9f5;
  font-weight: 900;
}

.module-table tr.pnl-result td {
  border-top: 2px solid #b8dccd;
  background: #eef6f2;
  font-weight: 900;
}

.module-table tr.pnl-child .name-cell strong {
  font-weight: 700;
}

@media (max-width: 900px) {
  .finance-transaction-form,
  .finance-operation-grid,
  .finance-recurring-row,
  .pnl-summary,
  .account-summary-grid,
  .account-transfer-panel {
    grid-template-columns: 1fr;
  }

  .finance-operation-grid textarea,
  .finance-operation-grid .finance-checkline {
    grid-column: auto;
  }
}

.module-table tr.cashflow-total-row td {
  background: #f3faf6;
  font-weight: 800;
}

.module-table tr.cashflow-net-row td {
  border-top: 2px solid #b8dccd;
  background: #eef6f2;
  font-weight: 900;
}

.bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6ebe3;
}

.bar span {
  display: block;
  height: 100%;
  background: var(--accent);
}

.toast {
  position: fixed;
  top: max(18px, env(safe-area-inset-top));
  right: 20px;
  bottom: auto;
  left: auto;
  z-index: 1200;
  max-width: min(420px, calc(100vw - 40px));
  padding: 14px 16px;
  border-radius: 8px;
  color: #fff;
  background: #060b08;
  box-shadow: 0 18px 44px rgba(6, 11, 8, 0.34);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.32;
  text-align: left;
  white-space: normal;
  transform: translateY(-16px);
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.device-access-guard {
  position: fixed;
  inset: 0;
  z-index: 1600;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(246, 250, 246, 0.94);
  backdrop-filter: blur(8px);
}

.device-access-panel {
  width: min(440px, 100%);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.device-access-logo {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 8px;
  color: #fff;
  background: #111a14;
  font-weight: 900;
}

.device-access-panel h1 {
  margin: 0 0 6px;
  font-size: 28px;
  line-height: 1.05;
}

.device-access-panel p {
  margin: 0 0 18px;
  color: var(--muted);
}

.device-access-panel form {
  display: grid;
  gap: 12px;
}

.device-access-panel label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
}

.device-access-state {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfb;
}

.device-access-state strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}

.device-access-state p {
  margin: 0;
}

.device-access-panel input,
.device-access-panel select {
  width: 100%;
}

.device-access-panel .primary {
  margin-top: 4px;
}

.device-bind-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.device-bind-actions button {
  width: 100%;
}

.device-bind-actions .ghost {
  margin-top: 0;
}

.device-qr-scanner {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfb;
}

.device-qr-scanner[hidden] {
  display: none;
}

.device-qr-scanner video {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  background: #111a14;
  object-fit: cover;
}

.device-qr-scanner small {
  margin: 0;
}

.device-access-panel .ghost {
  width: 100%;
  margin-top: 10px;
}

.device-access-panel small {
  display: block;
  margin-top: 14px;
  color: var(--muted);
}

.device-session-pill {
  position: fixed;
  right: 18px;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 1300;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(520px, calc(100vw - 36px));
  padding: 8px;
  border-color: rgba(20, 119, 95, 0.28);
  background: #e9f6f1;
  color: var(--accent);
  box-shadow: var(--shadow);
}

body.android-asset-app .device-session-pill {
  bottom: calc(18px + var(--app-bottom-safe));
}

.device-session-pill span {
  display: grid;
  min-width: 0;
  padding: 2px 8px 2px 4px;
}

.device-session-pill strong,
.device-session-pill small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-session-pill strong {
  color: var(--accent);
  font-weight: 900;
}

.device-session-pill small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.device-session-pill button {
  min-height: 36px;
  padding: 8px 12px;
  white-space: nowrap;
}

.device-session-pill .danger {
  border-color: #f0b8b1;
  background: #fff7f5;
  color: #a83b35;
}

@media (max-width: 1040px) {
  .app {
    grid-template-columns: 212px minmax(0, 1fr);
  }

  .rail {
    padding: 10px;
  }

  .nav {
    padding: 0 6px;
    font-size: 12px;
  }

  .topbar,
  .kpi-grid,
  .dashboard-grid,
  .pos-functions-grid,
  .crm-layout,
  .floor-layout,
  .kitchen-board,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .wide {
    grid-column: auto;
  }

  .activity-panel {
    grid-column: auto;
  }

  .pos-layout {
    grid-template-columns: minmax(270px, 330px) minmax(0, 1fr);
    gap: 10px;
  }

  .delivery-order,
  .delivery-zone,
  .content-grid.delivery-admin-grid,
  .delivery-map-fields,
  .delivery-map-footer {
    grid-template-columns: 1fr;
  }

  .delivery-map-footer button {
    justify-self: start;
  }

  .integration-fields,
  .integration-toggles {
    grid-template-columns: 1fr;
  }

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

  .warehouse-transfer-panel {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .function-window-backdrop {
    padding: 10px;
  }

  .workspace-window-backdrop {
    left: 0;
  }

  .function-window {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }

  .workspace-window-backdrop .function-window {
    width: 100%;
    height: 100%;
  }

  .workspace-window-backdrop .stock-transfer-window {
    height: 100%;
    max-height: 100%;
    padding-bottom: max(112px, calc(84px + env(safe-area-inset-bottom)));
    scroll-padding-bottom: max(130px, calc(96px + env(safe-area-inset-bottom)));
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .stock-transfer-route {
    grid-template-columns: 1fr;
  }

  .stock-transfer-route .route-comment {
    grid-column: auto;
  }

  .stock-transfer-window {
    width: 100%;
  }

  .workspace-window-backdrop .stock-document-print-window {
    height: 100%;
    max-height: 100%;
    overflow: auto;
  }

  .stock-document-print-sheet {
    width: calc(100% - 20px);
    margin: 10px auto;
    padding: 16px;
  }

  .stock-print-head,
  .stock-print-meta,
  .stock-print-signatures {
    grid-template-columns: 1fr;
  }

  .stock-print-total {
    flex-direction: column;
  }

  .stock-transfer-window .function-window-head {
    padding: 10px 12px;
  }

  .stock-transfer-route {
    padding: 8px 10px;
    gap: 7px;
  }

  .stock-transfer-route input,
  .stock-transfer-route select {
    width: 100%;
    min-height: 38px;
    font-size: 14px;
  }

  .stock-supply-table-wrap {
    margin: 0 10px;
    overflow: visible;
    flex: 0 0 auto;
    border: 0;
    background: transparent;
  }

  .stock-supply-table {
    display: block;
    width: 100% !important;
    min-width: 0 !important;
    table-layout: auto;
    border-spacing: 0;
  }

  .stock-supply-table thead {
    display: none;
  }

  .stock-supply-table tbody,
  .stock-supply-table tr,
  .stock-supply-table td {
    display: block;
    width: 100%;
  }

  .stock-supply-table tr {
    margin: 0 0 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
  }

  .stock-supply-table td {
    min-width: 0 !important;
    padding: 8px 10px;
    border-bottom: 1px solid var(--line);
  }

  .stock-supply-table td:last-child {
    border-bottom: 0;
    text-align: left;
  }

  .stock-supply-table td:not(.name-cell)::before {
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .stock-supply-table tr:not(.supply-add-row) td:nth-child(2)::before { content: "Фасування"; }
  .stock-supply-table tr:not(.supply-add-row) td:nth-child(3)::before { content: "Кількість"; }
  .stock-supply-table tr:not(.supply-add-row) td:nth-child(4)::before { content: "Ціна"; }
  .stock-supply-table tr:not(.supply-add-row) td:nth-child(5)::before { content: "Сума"; }
  .stock-supply-table tr:not(.supply-add-row) td:nth-child(6)::before { content: "Податок"; }
  .stock-supply-table tr:not(.supply-add-row) td:nth-child(7)::before { content: "Разом"; }

  .stock-supply-table .name-cell {
    min-width: 0;
  }

  .stock-supply-table .name-cell strong,
  .stock-supply-table .name-cell small {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .stock-supply-table input,
  .stock-supply-table select {
    width: 100%;
    min-height: 38px;
    font-size: 14px;
  }

  .stock-supply-table .price-input-wrap {
    grid-template-columns: minmax(0, 1fr) 30px;
  }

  .stock-supply-table .supply-add-row {
    border-style: dashed;
    background: #f7f9f5;
  }

  .stock-supply-table .supply-add-row td {
    padding: 10px;
    border: 0;
    background: transparent;
  }

  .stock-supply-table .supply-add-row td + td {
    padding-top: 0;
  }

  .stock-supply-table .supply-add-row td[colspan] {
    width: 100%;
  }

  .supply-search-cell input {
    width: 100%;
    min-width: 0;
  }

  .supply-suggestions {
    position: static;
    width: 100%;
    max-height: 260px;
    margin-top: 8px;
    box-shadow: none;
  }

  .supply-suggestions button {
    grid-template-columns: 34px minmax(0, 1fr);
    min-height: 58px;
  }

  .supply-suggestions em {
    grid-column: 2;
  }

  .supply-total-panel {
    margin: 8px 10px 0;
    grid-template-columns: 1fr 1fr;
  }

  .stock-transfer-window .recipe-editor-actions {
    position: static;
    bottom: auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 12px 10px max(132px, calc(96px + env(safe-area-inset-bottom)));
    padding: 10px;
    box-shadow: 0 -8px 20px rgba(15, 31, 27, 0.08);
  }

  .stock-transfer-window .recipe-editor-actions button {
    width: 100%;
    min-height: 42px;
  }

  .recipe-editor-grid,
  .recipe-dashboard,
  .recipe-control-panel,
  .recipe-editor-shell,
  .editor-window-shell,
  .recipe-form-row,
  .recipe-price-line,
  .recipe-part-row,
  .modifier-editor-row {
    grid-template-columns: 1fr;
  }

  .editor-side-nav {
    grid-template-rows: auto auto;
    grid-template-columns: minmax(160px, 0.5fr) minmax(0, 1fr);
    align-items: start;
    border-right: 0;
    border-bottom: 1px solid #e2e6e4;
  }

  .editor-side-nav nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .editor-side-summary {
    display: none;
  }

  .recipe-page-head {
    grid-template-columns: 30px minmax(0, 1fr) auto;
    min-height: 46px;
    padding: 0 10px;
  }

  .recipe-page-head h2 {
    font-size: 17px;
  }

  .recipe-head-actions {
    grid-column: auto;
    justify-content: flex-end;
    padding-bottom: 0;
  }

  .recipe-mobile-menu {
    display: block;
  }

  .recipe-editor-shell > .editor-main-sidebar {
    display: none;
  }

  .recipe-editor {
    padding: 12px 12px 28px;
  }

  .recipe-empty-card {
    grid-template-columns: 1fr;
  }

  .recipe-ops-panel,
  .recipe-code-line,
  .recipe-stock-preview-row {
    grid-template-columns: 1fr;
  }

  .recipe-ops-panel {
    display: grid;
  }

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

  .app {
    display: block;
  }

  .rail {
    position: static;
    height: auto;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    overflow-x: auto;
  }

  .brand-block {
    flex: 0 0 190px;
    border-bottom: 0;
    padding-bottom: 0;
  }

  .nav-tree {
    display: flex;
    gap: 10px;
  }

  .nav-group {
    min-width: 170px;
  }

  .rail-footer {
    display: none;
  }

  .topbar {
    position: static;
    display: grid;
    gap: 10px;
    padding: 14px;
  }

  .view {
    padding: 14px;
  }

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

  .activity-item {
    grid-template-columns: 1fr;
  }

  .draft-check {
    grid-template-columns: 1fr;
  }

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

body.view-pos .rail,
body.view-pos .topbar,
body.surface-pos .rail,
body.surface-pos .topbar,
body.surface-kitchen .rail,
body.surface-kitchen .topbar {
  display: none;
}

body.view-pos .app,
body.surface-pos .app,
body.surface-kitchen .app {
  display: block;
  min-height: 100vh;
}

body.view-pos .main,
body.surface-pos .main,
body.surface-kitchen .main {
  min-height: 100vh;
  overflow: hidden;
}

body.view-pos .view,
body.surface-pos .view,
body.surface-kitchen .view {
  padding: 12px;
}

body.view-pos #pos.view.active,
body.surface-pos #pos.view.active,
body.surface-kitchen #kitchen.view.active {
  min-height: 100vh;
}

body.view-pos .pos-layout,
body.surface-pos .pos-layout {
  min-height: calc(100dvh - 94px);
}

body.view-pos #pos.view.active,
body.surface-pos #pos.view.active {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100dvh;
  overflow: hidden;
}

body.view-pos .pos-command-bar,
body.surface-pos .pos-command-bar {
  flex: 0 0 auto;
  grid-template-columns: minmax(150px, 0.34fr) minmax(300px, 0.9fr) minmax(300px, 1fr);
  gap: 8px;
  margin: 0;
  padding: 10px;
}

body.view-pos .pos-status-grid,
body.surface-pos .pos-status-grid,
body.view-pos .pos-command-actions,
body.surface-pos .pos-command-actions {
  grid-template-columns: repeat(3, minmax(84px, 1fr));
  gap: 6px;
}

body.view-pos .pos-status,
body.surface-pos .pos-status,
body.view-pos .pos-command-actions button,
body.surface-pos .pos-command-actions button {
  min-height: 44px;
  padding: 0 8px;
}

body.view-pos .pos-layout,
body.surface-pos .pos-layout {
  flex: 1 1 auto;
  min-height: 0;
  grid-template-columns: clamp(286px, 31vw, 360px) minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

body.view-pos #pos.pos-check-open-mode .pos-layout,
body.surface-pos #pos.pos-check-open-mode .pos-layout {
  min-height: 0;
}

body.view-pos #pos.pos-check-open-mode .order-panel,
body.view-pos #pos.pos-check-open-mode .menu-browser,
body.surface-pos #pos.pos-check-open-mode .order-panel,
body.surface-pos #pos.pos-check-open-mode .menu-browser {
  height: auto;
  min-height: 0;
  overflow: auto;
}

body.view-pos .order-panel,
body.surface-pos .order-panel {
  align-self: stretch;
}

body.view-pos .menu-grid,
body.surface-pos .menu-grid {
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 8px;
}

body.view-pos .category-card,
body.surface-pos .category-card {
  min-height: 124px;
  padding: 8px;
}

body.view-pos .category-icon,
body.view-pos .category-photo,
body.surface-pos .category-icon,
body.surface-pos .category-photo {
  height: 62px;
}

body.view-pos .dish-card,
body.surface-pos .dish-card {
  min-height: 96px;
  padding: 9px;
}

body.surface-kitchen .kitchen-board {
  min-height: calc(100vh - 32px);
}

body.android-asset-app.surface-kitchen .view.active {
  padding-bottom: calc(12px + var(--app-bottom-safe));
}

body.android-asset-app.surface-kitchen .kitchen-board {
  min-height: calc(100vh - 32px - var(--app-bottom-safe));
  padding-bottom: var(--app-bottom-safe);
}

@media (min-width: 721px) and (max-width: 1180px) {
  .app {
    grid-template-columns: 196px minmax(0, 1fr);
  }

  .rail {
    padding: 10px 8px;
  }

  .brand-block {
    grid-template-columns: 38px 1fr;
    gap: 8px;
  }

  .logo {
    width: 38px;
    height: 38px;
  }

  .topbar {
    grid-template-columns: minmax(190px, 0.8fr) minmax(240px, 1fr);
    gap: 10px;
    padding: 12px 16px;
  }

  .topbar .status-strip {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .view {
    padding: 16px;
  }

  .panel {
    padding: 14px;
  }

  .kpi-grid,
  .import-live-status-grid,
  .import-data-stats,
  .account-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-bar label {
    min-width: min(210px, calc(50% - 8px));
    flex: 1 1 190px;
  }

  .module-table {
    width: max-content;
    min-width: max(100%, 860px);
  }
}

@media (max-width: 720px) {
  html {
    overflow-x: hidden;
  }

  body {
    min-width: 0;
    background: #f2f4f0;
  }

  .app {
    display: block;
    min-width: 0;
  }

  .rail {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 40;
    height: auto;
    max-height: min(80vh, 620px);
    display: grid;
    grid-template-columns: minmax(138px, 1fr) 92px;
    gap: 6px;
    padding: 7px 10px 8px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: #f7f9f5;
    box-shadow: 0 4px 10px rgba(28, 40, 32, 0.04);
    overflow: hidden;
  }

  .rail::after {
    display: none;
  }

  .rail-menu-button {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 86px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 18px;
    color: var(--ink);
    background: #fff;
    font-size: 14px;
    font-weight: 600;
  }

  .rail:hover .rail-menu-button,
  .rail.open .rail-menu-button,
  .rail-menu-button:focus-visible {
    outline: none;
    border-color: #c8d2ca;
    background: #f1f2f0;
  }

  .main {
    padding-top: 54px;
  }

  .brand-block {
    grid-column: 1;
    grid-row: 1;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 8px;
    min-height: 38px;
    padding: 0;
    border: 0;
  }

  .brand-block strong {
    font-size: 13px;
  }

  .brand-block small {
    font-size: 11px;
  }

  .logo {
    width: 34px;
    height: 34px;
    border-radius: 7px;
    font-size: 13px;
  }

  .nav-tree {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
    max-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    opacity: 0;
    transition: max-height 0.22s ease, opacity 0.18s ease, padding-top 0.18s ease;
  }

  .rail.open .nav-tree,
  .rail:hover .nav-tree,
  .rail:focus-within .nav-tree {
    max-height: calc(min(80vh, 620px) - 58px);
    padding-top: 6px;
    opacity: 1;
  }

  .nav-group {
    min-width: 0;
    display: grid;
  }

  .nav-parent {
    min-height: 26px;
    display: flex;
    padding: 0 8px;
    font-size: 15px;
    font-weight: 600;
  }

  .nav-parent::before {
    display: block;
  }

  .nav {
    display: flex;
    width: 100%;
    min-width: 0;
    min-height: 0;
    max-height: 0;
    border-color: transparent;
    padding: 0 8px 0 20px;
    text-align: left;
    white-space: normal;
    line-height: 1.1;
    background: transparent;
    font-size: 14px;
    font-weight: 400;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transform: translateY(-4px);
    transition: max-height 0.22s ease, min-height 0.22s ease, opacity 0.18s ease, transform 0.22s ease, background-color 0.18s ease;
  }

  .nav.active {
    color: #0c5449;
    border-color: transparent;
    background: #e8f3ef;
    font-weight: 600;
  }

  .topbar {
    position: static;
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 10px;
    background: #eef1ed;
  }

  .topbar h1 {
    font-size: 24px;
    line-height: 1.05;
  }

  .search input {
    min-height: 42px;
    font-size: 16px;
  }

  .status-strip {
    justify-content: flex-start;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    white-space: nowrap;
  }

  .role-switcher {
    grid-template-columns: auto 150px;
    flex: 0 0 auto;
  }

  .role-dropdown {
    width: 150px;
  }

  .view {
    padding: 10px;
  }

  .panel,
  .metric,
  .row,
  .queue-item,
  .insight,
  .activity-item,
  .order-line,
  .table-card,
  .finance-row {
    border-radius: 7px;
  }

  .panel {
    padding: 11px;
    box-shadow: 0 10px 28px rgba(28, 40, 32, 0.08);
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .panel-actions {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }

  .panel-actions button {
    flex: 0 0 auto;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
  }

  .metric {
    min-height: 112px;
    padding: 12px;
  }

  .metric strong {
    font-size: 24px;
  }

  .dashboard-grid,
  .content-grid,
  .crm-layout,
  .floor-layout,
  .fiscal-grid,
  .fiscal-checklist,
  .fiscal-dps-steps,
  .fiscal-live-summary,
  .fiscal-key-summary,
  .finance-transaction-form,
  .account-transfer-panel,
  .warehouse-transfer-panel,
  .inventory-create-panel {
    grid-template-columns: 1fr !important;
  }

  .guest-profile-detail,
  .campaign-editor-preview {
    grid-template-columns: 1fr;
  }

  .profile-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .activity-item,
  .delivery-order,
  .delivery-zone,
  .content-grid.delivery-admin-grid,
  .delivery-map-fields,
  .delivery-map-footer,
  .stock-transfer-row,
  .editable-row,
  .account-row,
  .cashflow-advice-row {
    grid-template-columns: 1fr !important;
  }

  .activity-action {
    justify-self: start;
  }

  .module-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 5px;
  }

  .module-tabs::-webkit-scrollbar {
    height: 4px;
  }

  .module-tabs::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #c4cec7;
  }

  .module-tabs button {
    flex: 0 0 auto;
    min-height: 34px;
  }

  .filter-bar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 8px;
  }

  .analytics-controls {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .sales-nav-panel {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .sales-check-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 10px;
  }

  .sales-filter-search,
  .sales-check-filters button {
    grid-column: 1 / -1;
  }

  .sales-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow-x: visible;
    padding-bottom: 0;
  }

  .sales-tabs button {
    width: 100%;
    min-width: 0;
    padding-inline: 6px;
  }

  .sales-summary-strip,
  .sales-overview-grid,
  .sales-popular-grid,
  .sales-comparison-grid {
    grid-template-columns: 1fr;
  }

  .sales-summary-strip div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sales-summary-strip div:last-child {
    border-bottom: 0;
  }

  .sales-bar-row,
  .sales-popular-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .sales-bar-cell {
    grid-template-columns: 1fr;
  }

  .sales-bar-cell b,
  .sales-popular-row span,
  .sales-popular-row b {
    text-align: left;
  }

  .sales-mini-chart {
    overflow-x: auto;
    grid-template-columns: repeat(14, minmax(28px, 1fr));
  }

  .sales-check-event,
  .sales-check-prro {
    grid-template-columns: 1fr;
  }

  .sales-check-detail-panel {
    padding: 8px;
  }

  .filter-bar label {
    min-width: 0;
  }

  .module-body {
    max-height: none;
  }

  .module-table-wrap,
  .stock-transfer-table {
    margin-inline: -2px;
    border-radius: 7px;
    overflow-x: auto;
    scrollbar-gutter: stable both-edges;
    -webkit-overflow-scrolling: touch;
  }

  .module-table {
    width: max-content;
    min-width: max(100%, 760px);
    font-size: 11px;
  }

  .module-table th,
  .module-table td {
    padding: 8px;
  }

  .module-table input,
  .module-table select {
    min-width: 76px;
    min-height: 32px;
    padding: 0 7px;
  }

  .module-table .name-cell {
    min-width: 180px;
  }

  .category-image-cell {
    width: 180px;
  }

  .category-admin-row .row-actions,
  .module-table .workshop-admin-row .row-actions {
    width: auto;
    min-width: 148px;
  }

  .import-data-stats,
  .import-live-status-grid,
  .account-summary-grid,
  .ai-stock-grid,
  .booking-form-grid,
  .booking-table-summary,
  .pos-table-status-grid,
  .pnl-summary,
  .supply-total-panel,
  .settings-grid,
  .settings-form-grid,
  .module-toggle-grid,
  .device-pairing-panel,
  .location-detail-grid,
  .location-tablet-settings,
  .location-operation-grid,
  .security-rule-row,
  .receipt-prediction-row,
  .communication-architecture,
  .communication-provider-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

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

  .settings-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-nav-list {
    position: static;
    max-height: none;
  }

  .import-live-status-grid b,
  .import-data-stats strong {
    font-size: 18px;
  }

  .workspace-window-backdrop {
    left: 0;
    padding: 0;
  }

  .workspace-window-backdrop .function-window,
  .function-window {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
  }

  .function-window-header {
    padding: 10px;
  }

  .recipe-editor-actions {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .recipe-editor-actions button {
    flex: 0 0 auto;
  }

  .ingredient-create-body {
    gap: 10px;
    padding: 10px 12px 0;
  }

  .ingredient-create-head h2 {
    font-size: 18px;
  }

  .ingredient-create-row {
    grid-template-columns: 1fr;
    gap: 5px;
    font-size: 12px;
  }

  .ingredient-create-short select,
  .ingredient-create-money > .recipe-money-input,
  .ingredient-create-percent > .recipe-money-input {
    max-width: none;
  }

  .ingredient-stock-accounting {
    margin: 12px -12px 0;
    padding: 12px;
  }

  .ingredient-stock-accounting h3 {
    font-size: 16px;
  }

  .ingredient-stock-accounting p {
    font-size: 12px;
  }

  .ingredient-create-actions {
    padding: 10px 12px max(12px, env(safe-area-inset-bottom));
  }

  .ingredient-create-actions .primary {
    width: 100%;
  }

  .booking-form-grid,
  .booking-table-summary,
  .pos-table-status-grid {
    grid-template-columns: 1fr !important;
  }

  .booking-form-grid .wide {
    grid-column: auto;
  }

  .toast {
    top: max(10px, env(safe-area-inset-top));
    right: 10px;
    bottom: auto;
    left: 10px;
    max-width: none;
  }
}

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

  .nav-tree {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav {
    min-height: 32px;
    font-size: 11px;
  }

  .brand-block {
    max-width: 190px;
  }

  .topbar h1 {
    font-size: 22px;
  }

  .status-strip > span:last-child {
    display: none;
  }

  .kpi-grid,
  .account-summary-grid,
  .ai-stock-grid,
  .pnl-summary,
  .supply-total-panel,
  .settings-overview-grid,
  .settings-form-grid,
  .module-toggle-grid,
  .device-pairing-panel,
  .location-detail-grid,
  .location-tablet-settings,
  .location-operation-grid,
  .security-rule-row,
  .receipt-prediction-row,
  .communication-architecture,
  .communication-provider-grid {
    grid-template-columns: 1fr !important;
  }

  .import-data-stats,
  .import-live-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .metric {
    min-height: auto;
  }

  .module-table {
    width: max-content;
    min-width: max(100%, 700px);
  }
}

@media (max-width: 760px) {
  .pos-checks-window-backdrop {
    padding: 0;
  }

  .function-window.pos-checks-window {
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
  }

  .pos-checks-window .function-window-head {
    gap: 10px;
  }

  .pos-checks-window-head-actions > button:not(.icon-close) {
    min-width: 0;
  }

  .pos-checks-toolbar {
    grid-template-columns: 1fr;
  }

  .pos-check-period-controls {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .pos-checks-list.compact {
    padding: 0 12px 12px;
  }

  .pos-check-list-head,
  .pos-checks-list.compact .pos-check-compact-row {
    grid-template-columns: 76px 48px minmax(0, 1fr) 82px;
    gap: 8px;
  }

  .pos-check-list-head span:nth-child(4),
  .pos-check-list-head span:nth-child(5),
  .pos-check-list-head span:nth-child(6),
  .pos-check-row-method,
  .pos-check-row-source,
  .pos-check-row-fiscal {
    display: none;
  }

  .pos-checks-layout {
    grid-template-columns: 1fr;
  }

  .pos-check-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .receipt-channel-grid,
  .payment-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .receipt-choice-actions button {
    flex: 1 1 140px;
    min-width: 0;
  }

  .pos-check-actions button,
  .pos-check-actions .badge {
    flex: 1 1 140px;
  }
}

@media (max-width: 340px) {
  .import-data-stats,
  .import-live-status-grid {
    grid-template-columns: 1fr !important;
  }
}

.table-qr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.table-qr-card {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.table-qr-card img {
  width: 84px;
  height: 84px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.table-qr-card small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-qr-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
}

.table-qr-actions button {
  flex: 1;
}

html.guest-order-root,
html.guest-order-root body.guest-order-page {
  height: auto !important;
  max-height: none !important;
  min-height: 100%;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

body.guest-order-page {
  height: auto !important;
  min-height: 100vh;
  min-height: 100dvh;
  position: static !important;
  background: #eef4ef;
  color: #14211d;
}

.guest-order-shell {
  width: min(920px, 100%);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 14px;
}

.guest-order-hero,
.guest-order-card {
  border: 1px solid #d5ded7;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(23, 48, 38, 0.08);
}

.guest-order-hero {
  padding: 18px;
  margin-bottom: 12px;
}

.guest-order-brand {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.guest-order-logo {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  overflow: hidden;
  border: 1px solid #d5ded7;
  border-radius: 8px;
  background: #f3f8f5;
  color: var(--green);
  font-size: 18px;
  font-weight: 900;
}

.guest-order-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.guest-order-brand strong,
.guest-order-brand small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guest-order-brand strong {
  font-size: 18px;
}

.guest-order-brand small {
  color: #65736c;
  font-weight: 800;
}

.guest-order-hero h1 {
  margin: 10px 0 4px;
  font-size: clamp(28px, 7vw, 48px);
  line-height: 1;
}

.guest-order-hero p {
  margin: 0;
  color: #65736c;
}

.guest-order-announcement {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #bfd8ca;
  border-radius: 8px;
  background: #f2fbf5;
  color: #1d5a3b;
  font-weight: 800;
}

.guest-order-card {
  padding: 14px;
  margin-bottom: 12px;
}

.guest-order-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.guest-order-head strong,
.guest-order-head b {
  font-size: 24px;
}

.guest-order-head small {
  display: block;
  color: #65736c;
}

.guest-fulfillment-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.guest-fulfillment-tabs:empty,
.guest-fulfillment-tabs[hidden] {
  display: none;
}

.guest-fulfillment-tabs button {
  display: grid;
  gap: 2px;
  justify-items: start;
  min-height: 56px;
  border-color: #d5ded7;
  background: #fff;
  font-weight: 900;
}

.guest-fulfillment-tabs button.active {
  border-color: var(--green);
  background: #eaf7ef;
  color: #123326;
}

.guest-fulfillment-tabs small {
  color: #65736c;
}

.guest-category-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
}

.guest-category-strip button {
  flex: 0 0 auto;
}

.guest-category-strip button.active {
  background: var(--green);
  color: #fff;
}

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

.guest-menu-item {
  position: relative;
  display: grid;
  min-height: 178px;
  border: 1px solid #d5ded7;
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  color: inherit;
  cursor: pointer;
  text-align: left;
  background: #fff;
}

.guest-menu-item:hover {
  border-color: #9cc8ad;
}

.guest-menu-item:focus-visible {
  outline: 3px solid rgba(22, 116, 99, 0.28);
  outline-offset: 2px;
}

.guest-menu-item.featured {
  border-color: #9cc8ad;
  box-shadow: 0 10px 22px rgba(29, 90, 59, 0.13);
}

.guest-menu-item.unavailable {
  cursor: not-allowed;
  opacity: 0.62;
}

.guest-menu-empty {
  grid-column: 1 / -1;
}

.guest-menu-item img,
.guest-menu-item span {
  display: grid;
  width: 100%;
  height: 92px;
  place-items: center;
  background: #e8f1ed;
  color: var(--green);
  font-size: 42px;
  font-weight: 800;
  object-fit: cover;
}

.guest-menu-item strong,
.guest-menu-item small,
.guest-menu-item b {
  padding: 0 12px;
}

.guest-menu-item strong {
  padding-top: 10px;
}

.guest-menu-item small {
  color: #65736c;
}

.guest-menu-item b {
  padding-bottom: 12px;
}

.guest-menu-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 48px;
  padding: 0 58px 12px 12px;
}

.guest-menu-meta b {
  padding: 0;
}

.guest-menu-modifier-note {
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.guest-menu-add {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: grid;
  width: 40px;
  height: 40px;
  min-height: 40px;
  place-items: center;
  border-color: var(--green);
  border-radius: 999px;
  padding: 0;
  background: var(--green);
  color: #fff;
  box-shadow: 0 10px 20px rgba(22, 116, 99, 0.22);
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
}

.guest-menu-add:hover {
  border-color: var(--green-800);
  background: var(--green-800);
}

.guest-menu-add:disabled {
  border-color: #cbd7d1;
  background: #cbd7d1;
  color: #63716a;
  box-shadow: none;
}

.guest-product-dialog-backdrop {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: end center;
  padding: 16px;
  background: rgba(10, 20, 16, 0.42);
}

.guest-product-dialog {
  display: grid;
  width: min(520px, 100%);
  max-height: min(820px, calc(100vh - 32px));
  overflow: hidden;
  border: 1px solid #d5ded7;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(10, 20, 16, 0.24);
}

.guest-product-media,
.guest-product-media span {
  display: grid;
  width: 100%;
  height: 220px;
  place-items: center;
  background: #e8f1ed;
  color: var(--green);
  font-size: 64px;
  font-weight: 900;
}

.guest-product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.guest-product-body {
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 252px);
  overflow-y: auto;
  padding: 16px;
}

.guest-product-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.guest-product-head h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.05;
}

.guest-product-head p {
  margin-top: 6px;
  color: #65736c;
}

.guest-product-price {
  white-space: nowrap;
  font-size: 22px;
  font-weight: 900;
}

.guest-product-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border-color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.92);
  font-size: 26px;
  line-height: 1;
}

.guest-product-dialog {
  position: relative;
}

.guest-product-modifiers {
  display: grid;
  gap: 8px;
}

.guest-product-modifiers strong {
  font-size: 14px;
}

.guest-product-modifier-list {
  display: grid;
  gap: 8px;
}

.guest-product-modifier-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  text-align: left;
}

.guest-product-modifier-list button.active {
  border-color: var(--green);
  background: #eaf7ef;
  color: #123326;
}

.guest-product-actions {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
}

.guest-product-actions .guest-qty {
  justify-content: center;
  min-height: 54px;
  padding: 0 8px;
  border: 1px solid #d5ded7;
  border-radius: 8px;
}

.guest-product-actions .guest-submit {
  min-height: 54px;
  margin-top: 0;
  font-size: 17px;
}

.guest-cart-lines {
  display: grid;
  gap: 8px;
}

.guest-cart-line {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #d5ded7;
  border-radius: 8px;
}

.guest-cart-line small {
  display: block;
  color: #65736c;
}

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

.guest-qty button {
  width: 38px;
  height: 38px;
  padding: 0;
}

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

.guest-order-form .wide {
  grid-column: 1 / -1;
}

.guest-address-field {
  position: relative;
  display: grid;
  gap: 6px;
}

.guest-address-suggestions {
  position: absolute;
  z-index: 30;
  top: calc(100% - 4px);
  left: 0;
  right: 0;
  display: grid;
  max-height: 220px;
  overflow: auto;
  border: 1px solid #d5ded7;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 32px rgba(23, 48, 38, 0.16);
}

.guest-address-suggestions:empty {
  display: none;
}

.guest-address-suggestions button {
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 0;
  background: #fff;
  text-align: left;
}

.guest-address-suggestions button:hover {
  background: #eef8f2;
}

.guest-address-suggestions strong,
.guest-address-suggestions small,
.guest-address-field small {
  display: block;
}

.guest-address-suggestions small,
.guest-address-field small {
  color: #65736c;
}

.content-grid.settings-grid {
  grid-template-columns: minmax(0, 1fr) !important;
}

.content-grid.settings-grid .wide {
  grid-column: 1 / -1 !important;
}

.guest-payment-note {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #d5ded7;
  border-radius: 8px;
  background: #f6faf7;
}

.guest-payment-note.warn {
  border-color: #e6c0aa;
  background: #fff7f1;
  color: #7b2b1a;
}

.guest-payment-note span {
  color: #65736c;
}

.guest-payment-options {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.guest-payment-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding: 10px 12px;
  border-color: #d5ded7;
  text-align: left;
}

.guest-payment-option span,
.guest-payment-option strong,
.guest-payment-option small {
  display: block;
}

.guest-payment-option small {
  color: #65736c;
}

.guest-payment-option.active {
  border-color: var(--green);
  background: #eaf7ef;
  color: #123326;
}

.guest-checkout-head {
  align-items: flex-start;
}

.guest-back-button {
  min-height: 30px;
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--green);
  font-weight: 900;
}

.guest-checkout-summary {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.guest-pay-link {
  display: grid;
  place-items: center;
  text-decoration: none;
}

.guest-submit {
  width: 100%;
  margin-top: 12px;
  padding: 16px;
  background: var(--green);
  color: #fff;
  font-size: 20px;
}

.guest-submit:disabled {
  background: #cbd7d1;
  color: #63716a;
}

.feedback-hero h1 {
  max-width: 680px;
}

.feedback-card {
  display: grid;
  gap: 12px;
}

.feedback-rating-grid,
.feedback-reason-grid {
  display: grid;
  gap: 8px;
}

.feedback-rating-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

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

.feedback-check-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #d5ded7;
  border-radius: 8px;
  padding: 12px;
  background: #f6faf7;
}

.feedback-check-link span {
  color: #65736c;
  font-weight: 800;
}

.feedback-check-link strong {
  font-size: 22px;
}

.feedback-rating-grid button,
.feedback-reason-grid button {
  min-width: 0;
  min-height: 48px;
  border-color: #d5ded7;
  background: #fff;
  font-weight: 800;
}

.feedback-rating-grid button {
  font-size: 22px;
}

.feedback-rating-grid button.active,
.feedback-reason-grid button.active {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.feedback-status {
  min-height: 20px;
  margin: 0;
  color: #9b341f;
  font-weight: 800;
}

.guest-success {
  display: grid;
  gap: 10px;
  justify-items: start;
  padding: 18px;
}

.guest-success h2 {
  margin: 0;
  font-size: 34px;
}

.guest-success p {
  margin: 0;
  color: #65736c;
}

.guest-success strong {
  font-size: 28px;
}

@media (max-width: 560px) {
  .guest-order-shell {
    padding: 10px;
  }

  .guest-order-hero {
    padding: 14px;
  }

  .guest-order-brand {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 10px;
  }

  .guest-order-logo {
    width: 46px;
    height: 46px;
  }

  .guest-order-brand strong {
    font-size: 16px;
  }

  .guest-menu-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .guest-cart-line,
  .guest-order-form {
    grid-template-columns: 1fr;
  }

  .feedback-rating-grid {
    grid-template-columns: repeat(5, minmax(42px, 1fr));
  }

  .feedback-reason-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .guest-cart-line > b {
    font-size: 20px;
  }

  .guest-product-dialog-backdrop {
    align-items: end;
    padding: 0;
  }

  .guest-product-dialog {
    width: 100%;
    max-height: calc(100vh - env(safe-area-inset-top, 0px));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 8px 8px 0 0;
  }

  .guest-product-media,
  .guest-product-media span {
    height: 180px;
  }

  .guest-product-body {
    max-height: calc(100vh - 180px - env(safe-area-inset-bottom, 0px));
    padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
  }

  .guest-product-head {
    display: grid;
  }

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

.surface-owner {
  background: #edf3ee;
  color: #14201a;
}

.owner-shell {
  min-height: 100vh;
  background: linear-gradient(180deg, #f8faf7 0%, #e7eee8 100%);
}

.owner-app {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
}

.owner-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 150px;
  padding: 28px;
  color: white;
  background: #10231f;
  border-radius: 24px;
  box-shadow: 0 22px 42px rgba(15, 42, 34, 0.18);
}

.owner-hero p,
.owner-hero h1,
.owner-hero span {
  margin: 0;
}

.owner-hero p {
  color: #9ee0ca;
  font-weight: 800;
}

.owner-hero h1 {
  margin-top: 8px;
  font-size: clamp(34px, 5vw, 64px);
  letter-spacing: 0;
}

.owner-hero span {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 20px;
}

.owner-primary,
.owner-action,
.owner-alert-action {
  border: 0;
  border-radius: 14px;
  background: #167463;
  color: white;
  font-size: 18px;
  font-weight: 800;
  padding: 16px 22px;
}

.owner-action {
  width: 100%;
  margin-top: 16px;
}

.owner-alert-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 16px 0 0;
  padding: 16px 18px;
  border: 1px solid #efb8ad;
  border-radius: 18px;
  background: #fff4f0;
  box-shadow: 0 16px 32px rgba(150, 48, 32, 0.08);
}

.owner-alert-strip span,
.owner-alert-strip strong,
.owner-alert-strip p {
  display: block;
  margin: 0;
}

.owner-alert-strip span {
  color: #9b341f;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.owner-alert-strip strong {
  margin-top: 4px;
  color: #5f1d13;
  font-size: 24px;
}

.owner-alert-strip p {
  margin-top: 4px;
  color: #70433b;
  font-weight: 700;
}

.owner-alert-action {
  flex: 0 0 auto;
  background: #9b341f;
}

.owner-kpi-grid,
.owner-grid {
  display: grid;
  gap: 16px;
}

.owner-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 16px 0;
}

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

.owner-card-wide {
  grid-column: span 2;
}

.owner-kpi,
.owner-card {
  background: #fff;
  border: 1px solid #d5ded5;
  border-radius: 18px;
  box-shadow: 0 16px 32px rgba(37, 58, 45, 0.07);
}

.owner-kpi {
  padding: 18px;
}

.owner-kpi span,
.owner-kpi small,
.owner-muted,
.owner-card p {
  color: #68756d;
}

.owner-kpi strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 34px;
}

.owner-card {
  padding: 18px;
}

.owner-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.owner-card-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.owner-card-toggle {
  border: 0;
  border-radius: 10px;
  background: #f0f6f2;
  color: #1f5248;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 10px;
  min-height: 32px;
  cursor: pointer;
}

.owner-card h2,
.owner-card p {
  margin: 0;
}

.owner-card-body {
  display: block;
}

.owner-card.is-collapsed .owner-card-body {
  display: none;
}

.owner-card h2 {
  font-size: 24px;
}

.owner-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: #e5f2ec;
  color: #0f6d5d;
  font-weight: 800;
  white-space: nowrap;
}

.owner-pill.danger {
  background: #ffe4e2;
  color: #a3312d;
}

#ownerRevenueChart {
  display: block;
  width: 100%;
  max-height: 300px;
  border: 1px solid #d9e2d9;
  border-radius: 16px;
  background: #f8faf7;
}

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

.owner-insights div,
.owner-forecast,
.owner-client,
.owner-live-list div,
.owner-purchase-row {
  border: 1px solid #d9e2d9;
  border-radius: 14px;
  background: #f8faf7;
}

.owner-insights div {
  padding: 12px;
  font-weight: 700;
}

.owner-risk-row {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #e5ece5;
}

.owner-risk-row:last-of-type {
  border-bottom: 0;
}

.owner-risk-row > span {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  margin-top: 5px;
  border-radius: 999px;
  background: #22c55e;
}

.owner-risk-row[data-level="medium"] > span {
  background: #f59e0b;
}

.owner-risk-row[data-level="high"] > span {
  background: #ef4444;
}

.owner-risk-row strong,
.owner-risk-row p {
  display: block;
  margin: 0;
}

.owner-risk-row p {
  margin-top: 2px;
}

.owner-purchase-row,
.owner-live-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  margin-bottom: 10px;
}

.owner-purchase-row span,
.owner-live-list span {
  color: #0f6d5d;
  font-weight: 800;
}

.owner-forecast,
.owner-client {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.owner-client span {
  color: #0f6d5d;
  font-size: 28px;
  font-weight: 900;
}

.owner-client.owner-client-alert {
  border-color: #efb8ad;
  background: #fff4f0;
}

.owner-client.owner-client-alert span {
  color: #9b341f;
}

@media (max-width: 900px) {
  .owner-app {
    padding: 12px;
  }

  .owner-hero {
    align-items: flex-start;
    flex-direction: column;
    border-radius: 18px;
  }

  .owner-alert-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .owner-kpi-grid,
  .owner-grid,
  .owner-insights {
    grid-template-columns: 1fr;
  }

  .owner-card-wide {
    grid-column: auto;
  }
}

@media (max-width: 1366px) and (min-width: 721px) {
  html,
  body {
    overflow-x: hidden;
  }

  body {
    font-size: 13px;
  }

  button {
    min-height: 30px;
    border-radius: 6px;
    padding: 0 8px;
    font-size: 12px;
  }

  input,
  select {
    min-height: 32px;
    padding: 0 8px;
    font-size: 12px;
  }

  textarea {
    font-size: 12px;
  }

  .app {
    grid-template-columns: 164px minmax(0, 1fr);
    max-width: 100vw;
    overflow-x: hidden;
  }

  .rail {
    gap: 8px;
    padding: 8px 7px;
  }

  .brand-block {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 7px;
    min-height: 40px;
    padding-bottom: 7px;
  }

  .brand-block strong {
    font-size: 12px;
  }

  .brand-block small,
  .rail-footer small {
    font-size: 10px;
  }

  .logo {
    width: 34px;
    height: 34px;
    border-radius: 7px;
    font-size: 14px;
  }

  .nav-tree {
    gap: 6px;
  }

  .nav-parent {
    min-height: 28px;
    padding: 0 6px;
    font-size: 13px;
  }

  .nav {
    min-height: 26px;
    padding: 0 6px 0 18px;
    font-size: 12px;
    line-height: 1.15;
  }

  .rail-footer {
    grid-template-columns: 14px minmax(0, 1fr) 30px;
    gap: 6px;
    padding-top: 8px;
  }

  .rail-settings-button {
    width: 30px;
    height: 30px;
  }

  .main,
  .view,
  .panel,
  .content-grid,
  .dashboard-grid,
  .kpi-grid {
    min-width: 0;
    max-width: 100%;
  }

  .topbar {
    grid-template-columns: minmax(170px, 0.8fr) minmax(210px, 1fr) minmax(240px, auto);
    gap: 8px;
    padding: 9px 12px;
  }

  .topbar h1 {
    font-size: 24px;
    line-height: 1.05;
  }

  .eyebrow,
  .status-strip {
    font-size: 11px;
  }

  .status-strip {
    gap: 6px;
    white-space: nowrap;
  }

  .role-switcher {
    grid-template-columns: auto 126px;
    gap: 5px;
  }

  .role-dropdown {
    width: 126px;
  }

  .search input {
    min-height: 34px;
  }

  .view {
    padding: 10px;
  }

  .panel {
    padding: 10px;
    border-radius: 7px;
  }

  .panel-head {
    gap: 8px;
  }

  .panel-head h2 {
    font-size: 16px;
  }

  .content-grid,
  .dashboard-grid,
  .crm-layout,
  .floor-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .wide,
  .activity-panel {
    grid-column: auto;
  }

  .kpi-grid,
  .recipe-dashboard,
  .import-live-status-grid,
  .import-data-stats,
  .pnl-summary,
  .account-summary-grid,
  .settings-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px;
  }

  .metric {
    min-height: 86px;
    padding: 10px;
  }

  .metric strong,
  .recipe-dashboard strong,
  .recipe-control-stat strong,
  .import-live-status-grid b {
    font-size: 20px;
  }

  .metric span,
  .metric small,
  .recipe-dashboard span,
  .recipe-dashboard small,
  .import-live-status-grid small {
    font-size: 10px;
  }

  .recipe-dashboard > button,
  .recipe-dashboard > div {
    min-height: 78px;
    padding: 10px;
  }

  .recipe-ops-panel {
    display: grid;
    gap: 10px;
    padding: 10px;
  }

  .recipe-ops-panel p {
    max-width: none;
    font-size: 12px;
  }

  .filter-bar {
    gap: 8px;
    padding: 8px;
  }

  .filter-bar label {
    min-width: min(180px, calc(50% - 8px));
    flex: 1 1 160px;
    font-size: 11px;
  }

  .module-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 4px;
    padding: 4px;
  }

  .module-tabs button {
    flex: 0 1 auto;
    min-width: 0;
    min-height: 30px;
    padding: 0 8px;
    font-size: 11px;
    white-space: nowrap;
  }

  .module-body {
    max-height: none;
  }

  .module-table-xbar {
    display: none;
  }

  .module-table-wrap,
  .stock-transfer-table,
  .menu-dish-table-wrap,
  .modifier-catalog-table-wrap,
  .settings-order-table-wrap,
  .settings-payment-table-wrap,
  .sales-table-wrap,
  .inventory-table-wrap {
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-gutter: auto;
  }

  .module-table,
  .recipe-register-table,
  .modifier-catalog-table,
  .settings-order-table,
  .settings-payment-table,
  .stock-transfer-table .module-table,
  .sales-check-table,
  .inventory-table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed;
    font-size: 10px;
  }

  .module-table th,
  .module-table td {
    padding: 6px 5px;
    vertical-align: top;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .module-table .name-cell,
  .module-table .name-cell strong,
  .module-table .name-cell small,
  .module-table tr.recipe-register-row .name-cell small {
    min-width: 0;
    white-space: normal;
  }

  .module-table .row-actions {
    display: grid;
    gap: 4px;
    min-width: 0;
  }

  .module-table .row-actions button {
    width: 100%;
    min-height: 26px;
    padding: 0 5px;
    font-size: 10px;
  }

  .category-admin-row .row-actions,
  .module-table .workshop-admin-row .row-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 110px;
  }

  .category-admin-row .row-actions button,
  .module-table .workshop-admin-row .row-actions button {
    width: auto;
    min-width: 46px;
    padding: 0 7px;
  }

  .module-table input,
  .module-table select {
    min-width: 0;
    min-height: 28px;
    padding: 0 5px;
    font-size: 10px;
  }

  .recipe-register-table th:nth-child(1),
  .recipe-register-table td:nth-child(1) {
    width: 28%;
  }

  .recipe-register-table th:nth-child(2),
  .recipe-register-table td:nth-child(2),
  .recipe-register-table th:nth-child(3),
  .recipe-register-table td:nth-child(3) {
    width: 11%;
  }

  .recipe-register-table th:nth-child(4),
  .recipe-register-table td:nth-child(4),
  .recipe-register-table th:nth-child(5),
  .recipe-register-table td:nth-child(5),
  .recipe-register-table th:nth-child(6),
  .recipe-register-table td:nth-child(6),
  .recipe-register-table th:nth-child(7),
  .recipe-register-table td:nth-child(7) {
    width: auto;
  }

  .recipe-register-table th:nth-child(7),
  .recipe-register-table td:nth-child(7) {
    width: 24%;
  }

  .recipe-register-table .recipe-register-actions-cell,
  .recipe-register-table .recipe-register-actions {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
  }

  .sales-check-table th:nth-child(6),
  .sales-check-table td:nth-child(6),
  .sales-check-table th:nth-child(7),
  .sales-check-table td:nth-child(7) {
    display: none;
  }

  .pos-layout {
    grid-template-columns: minmax(285px, 340px) minmax(0, 1fr);
    gap: 10px;
  }

  .pos-home {
    gap: 10px;
  }

  .pos-command-bar {
    grid-template-columns: minmax(150px, 0.46fr) minmax(330px, 1fr) minmax(260px, auto);
    align-items: stretch;
    gap: 8px;
    padding: 10px;
  }

  .pos-command-bar > div:first-child {
    display: grid;
    align-content: center;
    min-height: 46px;
  }

  .pos-status-grid {
    grid-template-columns: repeat(3, minmax(94px, 1fr));
    gap: 6px;
  }

  .pos-command-actions {
    grid-template-columns: repeat(3, minmax(72px, 1fr));
    gap: 6px;
  }

  .pos-status,
  .pos-command-actions button {
    min-height: 46px;
    padding: 0 8px;
    font-size: 11px;
  }

  .pos-functions-grid,
  .settings-grid,
  .settings-form-grid,
  .finance-transaction-form,
  .account-transfer-panel,
  .warehouse-transfer-panel,
  .inventory-create-panel,
  .supplier-contact-card,
  .supplier-ledger-summary,
  .stock-balance-summary,
  .campaign-editor-grid,
  .finance-operation-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .recipe-page-head {
    min-height: 46px;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    padding: 0 11px;
  }

  .recipe-page-head h2 {
    font-size: 16px;
  }

  .recipe-editor-shell,
  .editor-window-shell {
    grid-template-columns: 172px minmax(0, 1fr);
  }

  .editor-side-nav {
    padding: 10px 8px;
  }

  .editor-side-brand {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .editor-side-brand span {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }

  .editor-side-nav a,
  .editor-side-nav button,
  .editor-side-nav strong {
    min-height: 26px;
    padding: 0 7px;
    font-size: 11px;
  }

  .recipe-editor {
    padding: 11px 13px 24px;
  }

  .recipe-form-row {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 10px;
  }

  .recipe-form-row > span,
  .recipe-form-row input,
  .recipe-form-row select {
    font-size: 11px;
  }

  .recipe-form-row small,
  .recipe-section-head p,
  .recipe-empty-card p {
    font-size: 10px;
  }

  .recipe-price-line {
    grid-template-columns: minmax(120px, 150px) 110px 138px;
    gap: 16px;
  }

  .recipe-empty-card {
    min-height: 108px;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 14px;
    padding: 16px 18px;
  }
}

@media (max-width: 1024px) and (min-width: 721px) {
  .app {
    grid-template-columns: 142px minmax(0, 1fr);
  }

  .brand-block {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .logo {
    width: 30px;
    height: 30px;
  }

  .nav-parent {
    font-size: 12px;
  }

  .nav {
    font-size: 11px;
  }

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

  .pos-layout {
    grid-template-columns: minmax(250px, 300px) minmax(0, 1fr);
  }

  .status-strip {
    overflow-x: auto;
  }

  .kpi-grid,
  .recipe-dashboard,
  .import-live-status-grid,
  .import-data-stats,
  .pnl-summary,
  .account-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .fiscal-wizard-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .module-table {
    font-size: 9px;
  }

  .module-table th,
  .module-table td {
    padding: 5px 4px;
  }

  .recipe-register-table th:nth-child(2),
  .recipe-register-table td:nth-child(2),
  .recipe-register-table th:nth-child(3),
  .recipe-register-table td:nth-child(3) {
    display: none;
  }

  .recipe-register-table th:nth-child(7),
  .recipe-register-table td:nth-child(7) {
    width: 34%;
  }

  .recipe-register-table .recipe-register-actions-cell {
    gap: 6px;
  }

  .recipe-register-table .recipe-register-actions button {
    padding: 0 3px;
  }

  .recipe-form-row,
  .recipe-price-line {
    grid-template-columns: 1fr;
  }
}

.nav {
  min-height: 0;
  max-height: 0;
  border-width: 0;
  margin-top: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: max-height 0.32s ease, min-height 0.32s ease, opacity 0.26s ease, transform 0.36s cubic-bezier(0.22, 1, 0.36, 1), margin-top 0.32s ease, background-color 0.18s ease;
}

.nav-group.expanded .nav,
.nav-group:hover .nav {
  transition: max-height 0.32s ease, min-height 0.32s ease, opacity 0.26s ease, transform 0.36s cubic-bezier(0.22, 1, 0.36, 1), margin-top 0.32s ease, background-color 0.18s ease;
  min-height: 30px;
  max-height: 34px;
  margin-top: 4px;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.import-live-status .import-live-status-grid small {
  font-size: 12px;
  font-weight: 600;
}

#dashboard,
#dashboard .import-live-status,
#dashboard .import-live-status-grid,
#dashboard .kpi-grid,
#dashboard .dashboard-grid,
#dashboard .panel {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 1180px) {
  .fiscal-simple-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .main {
    overflow-x: clip;
    overflow-y: visible;
  }

  #dashboard {
    overflow-x: hidden;
  }

  .fiscal-wizard-steps,
  .fiscal-master-head,
  .fiscal-master-steps,
  .fiscal-master-grid,
  .fiscal-grid,
  .fiscal-form,
  .fiscal-master-section .fiscal-form,
  .fiscal-live-summary,
  .fiscal-key-summary,
  .fiscal-dps-steps,
  .fiscal-next-step {
    grid-template-columns: 1fr !important;
  }

  .fiscal-simple-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #dashboard .metric {
    min-height: auto;
    padding: 12px 24px;
  }

  #dashboard .metric strong {
    margin: 6px 0 4px;
  }

  body.view-pos #pos.view.active,
  body.surface-pos #pos.view.active {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  body.view-pos .pos-command-bar,
  body.surface-pos .pos-command-bar {
    grid-template-columns: 1fr;
  }

  body.view-pos .pos-layout,
  body.surface-pos .pos-layout {
    grid-template-columns: 1fr;
  }

  body.view-pos #pos.pos-check-open-mode .order-panel,
  body.view-pos #pos.pos-check-open-mode .menu-browser,
  body.surface-pos #pos.pos-check-open-mode .order-panel,
  body.surface-pos #pos.pos-check-open-mode .menu-browser {
    max-height: none;
  }

  .stock-supply-table-wrap {
    overflow: visible !important;
    flex: 0 0 auto !important;
  }

  .workspace-window-backdrop .stock-transfer-window {
    padding-bottom: max(112px, calc(84px + env(safe-area-inset-bottom))) !important;
    scroll-padding-bottom: max(130px, calc(96px + env(safe-area-inset-bottom)));
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
  }

  .stock-transfer-window .recipe-editor-actions {
    position: static !important;
    bottom: auto !important;
    margin-bottom: max(132px, calc(96px + env(safe-area-inset-bottom))) !important;
  }

  .stock-transfer-table .stock-supply-table {
    display: block;
    width: 100% !important;
    min-width: 0 !important;
    table-layout: auto !important;
  }

  .stock-supply-table thead {
    display: none;
  }

  .stock-supply-table tbody,
  .stock-supply-table tr,
  .stock-supply-table td {
    display: block;
    width: 100%;
  }

  .stock-supply-table .supply-add-row td[colspan] {
    display: block;
    width: 100%;
  }

  .stock-supply-table .supply-search-cell input {
    width: 100%;
    min-width: 0;
  }

  .recipe-page-head {
    grid-template-columns: 30px minmax(0, 1fr) auto !important;
  }

  .recipe-head-actions {
    grid-column: auto !important;
    justify-content: flex-end !important;
    padding-bottom: 0 !important;
  }

  .recipe-mobile-menu {
    display: block !important;
  }

  .recipe-editor-shell {
    grid-template-columns: 1fr !important;
  }

  .recipe-editor-shell > .editor-main-sidebar {
    display: none !important;
  }

  .product-price-line,
  .product-modification-row,
  .product-modification-row.readonly-row,
  .product-modification-actions {
    grid-template-columns: 1fr !important;
  }

  .product-mod-mode,
  .product-mod-mode-expanded {
    grid-template-columns: 18px minmax(0, 1fr) !important;
  }

  .product-modification-list,
  .product-mod-add-link {
    grid-column: 1 / -1;
    margin-left: 0;
  }

  .product-modification-row .product-mod-name,
  .product-modification-row label:nth-of-type(2),
  .product-modification-row label:nth-of-type(3) {
    grid-column: auto;
  }

  .product-mod-symbol {
    display: none;
  }
}

@media (max-width: 480px) {
  #dashboard .kpi-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 720px) {
  .recipe-register-table-wrap {
    overflow-x: auto !important;
    overflow-y: auto;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
  }

  .recipe-register-table {
    width: max-content !important;
    min-width: 860px !important;
  }
}

.recipe-register-table .recipe-register-actions-cell {
  display: table-cell;
  min-width: 0;
  text-align: right;
  vertical-align: middle;
  white-space: nowrap;
}

.recipe-register-table .recipe-register-action-layout {
  width: 100%;
  min-width: 0;
  display: inline-grid;
  grid-template-columns: 42px max-content;
  align-items: center;
  justify-content: end;
  gap: 8px;
}

.recipe-register-table .recipe-register-markup {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 42px;
  font-weight: 800;
  white-space: nowrap;
}

.recipe-register-table .recipe-register-actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
  white-space: nowrap;
}

.recipe-register-table .recipe-register-actions button {
  width: auto;
  min-width: 30px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d7ddd4;
  border-radius: 6px;
  padding: 0 7px;
  color: #315c9a;
  background: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.recipe-register-table .recipe-register-actions .recipe-register-action-main {
  min-width: 68px;
}

.recipe-register-table .recipe-register-actions button:hover {
  border-color: #b8c5bc;
  color: #0f6256;
  background: #f5f8f5;
}

@media (max-width: 420px) {
  .receipt-channel-grid,
  .payment-summary-grid,
  .pos-check-meta {
    grid-template-columns: 1fr !important;
  }

  .receipt-choice-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .receipt-choice-actions button {
    width: 100%;
  }
}

@media (max-width: 1366px) {
  .module-tabs {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap !important;
    align-items: center;
    gap: 6px;
    overflow-x: visible !important;
    padding: 0;
  }

  .module-tabs button {
    flex: 0 1 auto;
    min-width: max-content;
    min-height: 32px;
    white-space: nowrap;
  }

  .fiscal-details-block .module-table-wrap {
    max-width: 100%;
    overflow-x: hidden !important;
    overflow-y: auto;
    scrollbar-gutter: auto;
    padding-bottom: 0;
    -webkit-overflow-scrolling: touch;
  }

  .fiscal-admin-table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
  }

  .fiscal-admin-table th:nth-child(1),
  .fiscal-admin-table td:nth-child(1) {
    width: 12%;
  }

  .fiscal-admin-table th:nth-child(2),
  .fiscal-admin-table td:nth-child(2) {
    width: 17%;
  }

  .fiscal-admin-table th:nth-child(3),
  .fiscal-admin-table td:nth-child(3) {
    width: 9%;
  }

  .fiscal-admin-table th:nth-child(4),
  .fiscal-admin-table td:nth-child(4) {
    width: 10%;
  }

  .fiscal-admin-table th:nth-child(5),
  .fiscal-admin-table td:nth-child(5) {
    width: 25%;
  }

  .fiscal-admin-table th:nth-child(6),
  .fiscal-admin-table td:nth-child(6) {
    width: 27%;
  }

  .fiscal-admin-table th:last-child,
  .fiscal-admin-table td:last-child {
    width: 27%;
    min-width: 0;
    background: transparent;
  }

  .fiscal-admin-table .row-actions {
    display: table-cell !important;
    text-align: center;
    vertical-align: middle;
    width: 100%;
    min-width: 0;
    padding: 8px 10px;
  }

  .fiscal-admin-table .row-actions button,
  .fiscal-admin-table .row-actions select {
    display: block;
    width: 100%;
    max-width: 152px;
    min-width: 0;
    min-height: 34px;
    margin: 0 auto 8px;
    padding: 0 10px;
    font-size: 12px;
  }

  .fiscal-admin-table .row-actions button:last-child,
  .fiscal-admin-table .row-actions select:last-child {
    margin-bottom: 0;
  }
}

@media (max-width: 720px) {
  .supplier-contact-card,
  .supplier-ledger-summary,
  .supplier-reorder-row,
  .supplier-assortment-row,
  .supplier-payment-row,
  .supplier-pay-inline {
    grid-template-columns: 1fr !important;
  }

  .module-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  }

  .module-tabs button {
    width: 100%;
    min-width: 0;
    min-height: 34px;
    padding: 4px 7px;
    line-height: 1.1;
    white-space: normal;
  }

  .fiscal-card .panel-head,
  .fiscal-master-section .panel-actions {
    align-items: stretch;
  }

  .fiscal-card .panel-actions,
  .fiscal-master-section .panel-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
    justify-content: stretch;
    width: 100%;
    overflow-x: visible;
    gap: 8px;
    padding-bottom: 0;
  }

  .fiscal-card .panel-actions button,
  .fiscal-master-section .panel-actions button {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    padding: 0 8px;
    font-size: 13px;
    line-height: 1.05;
    white-space: normal;
  }
}

#menu .menu-dish-table-wrap {
  max-width: 100% !important;
  max-height: none !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-gutter: stable both-edges;
}

#menu .menu-dish-table {
  width: max(100%, 1320px) !important;
  min-width: 1320px !important;
  table-layout: fixed !important;
}

#menu .menu-dish-table th,
#menu .menu-dish-table td {
  overflow-wrap: normal !important;
  word-break: normal !important;
}

#menu .menu-dish-table th:nth-child(1),
#menu .menu-dish-table td:nth-child(1) {
  width: 27% !important;
}

#menu .menu-dish-table th:nth-child(2),
#menu .menu-dish-table td:nth-child(2) {
  width: 11% !important;
}

#menu .menu-dish-table th:nth-child(3),
#menu .menu-dish-table td:nth-child(3) {
  width: 6% !important;
}

#menu .menu-dish-table th:nth-child(4),
#menu .menu-dish-table td:nth-child(4) {
  width: 10% !important;
}

#menu .menu-dish-table th:nth-child(5),
#menu .menu-dish-table td:nth-child(5),
#menu .menu-dish-table th:nth-child(6),
#menu .menu-dish-table td:nth-child(6),
#menu .menu-dish-table th:nth-child(7),
#menu .menu-dish-table td:nth-child(7),
#menu .menu-dish-table th:nth-child(9),
#menu .menu-dish-table td:nth-child(9) {
  width: 7% !important;
}

#menu .menu-dish-table th:nth-child(8),
#menu .menu-dish-table td:nth-child(8) {
  width: 8% !important;
}

#menu .menu-dish-table th:nth-child(10),
#menu .menu-dish-table td:nth-child(10) {
  width: 11% !important;
}

#menu .menu-dish-table .media-link-cell {
  grid-template-columns: 40px minmax(0, 1fr) !important;
  min-width: 0;
}

#menu .menu-dish-table .media-link-cell strong,
#menu .menu-dish-table .media-link-cell small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

#menu .menu-dish-table .badge {
  max-width: 100%;
  white-space: nowrap !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
}

#menu .menu-dish-table td.row-actions {
  display: table-cell !important;
  min-width: 0;
  vertical-align: middle;
}

#menu .menu-dish-table td.row-actions button {
  display: block;
  width: 100%;
  max-width: 112px;
  min-height: 32px;
  margin: 0 auto 5px;
  padding: 0 8px;
  font-size: 12px;
  white-space: nowrap;
}

#menu .menu-dish-table td.row-actions button:last-child {
  margin-bottom: 0;
}
