:root {
  --bg: #171717;
  --surface: #ffffff;
  --surface-soft: #f6f5f3;
  --surface-muted: #fbfaf8;
  --text: #181818;
  --muted: #6f6f6f;
  --line: #e4e0dc;
  --orange: #f47718;
  --orange-dark: #d85b08;
  --orange-soft: #fff0e5;
  --green: #237a4b;
  --red: #bd2d22;
  --focus: 0 0 0 4px rgba(244, 119, 24, 0.14);
  --shadow: 0 18px 42px rgba(24, 24, 24, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--surface-soft);
}

body.login-page {
  background:
    linear-gradient(135deg, rgba(244, 119, 24, 0.16) 0%, rgba(244, 119, 24, 0) 36%),
    linear-gradient(145deg, #242424 0%, #121212 58%, #202020 100%);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button,
.nav-link,
.panel,
.stat-card,
.command-card,
.cashier-command-card,
.production-card,
.waiter-product,
.secondary-button,
.danger-button,
.secondary-action-button,
.danger-action-button,
.primary-button {
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, background-color 160ms ease, color 160ms ease;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.sidebar {
  min-height: 100vh;
  padding: 22px;
  color: #ffffff;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, #202020 0%, #111111 100%);
}

.brand {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  color: #ffffff;
  background: var(--orange);
  box-shadow: 0 12px 26px rgba(244, 119, 24, 0.32);
  font-weight: 800;
}

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

.brand strong {
  font-size: 1rem;
  line-height: 1.2;
}

.brand span {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.82rem;
}

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

.nav-link {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 11px;
  position: relative;
  padding: 0 12px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.94rem;
  font-weight: 700;
}

.nav-link::before {
  content: "";
  width: 3px;
  height: 22px;
  position: absolute;
  left: 0;
  border-radius: 999px;
  background: transparent;
}

.nav-link svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.nav-link.is-active,
.nav-link:hover {
  color: #ffffff;
  background: rgba(244, 119, 24, 0.18);
}

.nav-link.is-active::before {
  background: var(--orange);
}

.main-content {
  min-width: 0;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0) 240px),
    var(--surface-soft);
}

.topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.eyebrow,
.topbar h1,
.panel-heading h2,
.form-message,
.empty-state {
  margin: 0;
}

.eyebrow {
  margin-bottom: 6px;
  color: var(--orange-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.topbar h1 {
  font-size: 2rem;
  line-height: 1.1;
  letter-spacing: 0;
}

.owner-chip {
  min-height: 54px;
  display: grid;
  align-content: center;
  min-width: 150px;
  grid-template-columns: 1fr auto;
  column-gap: 12px;
  padding: 8px 10px 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(24, 24, 24, 0.05);
}

.owner-chip span,
.owner-chip strong {
  display: block;
}

.owner-chip span {
  color: var(--muted);
  font-size: 0.74rem;
}

.owner-chip strong {
  font-size: 0.92rem;
}

.logout-button {
  grid-row: 1 / span 2;
  grid-column: 2;
  min-height: 34px;
  align-self: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #ffffff;
  font-size: 0.8rem;
  font-weight: 800;
}

.logout-button:hover {
  background: var(--surface-soft);
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(100%, 410px);
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.36);
}

.login-card form[hidden] {
  display: none !important;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
  padding-bottom: 22px;
  border-bottom: 1px solid #eeeeee;
}

.login-brand p,
.login-brand h1 {
  margin: 0;
}

.login-brand p {
  margin-bottom: 5px;
  color: var(--orange-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.login-brand h1 {
  font-size: 1.68rem;
  line-height: 1.1;
  letter-spacing: 0;
}

.login-secondary-button {
  width: 100%;
  min-height: 44px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #ffffff;
  font-weight: 800;
}

.login-secondary-button:hover {
  border-color: rgba(244, 119, 24, 0.36);
  color: var(--orange-dark);
  background: var(--orange-soft);
}

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

.view-panel {
  display: none;
}

.view-panel.is-visible {
  display: block;
}

.stat-card {
  min-height: 88px;
  position: relative;
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(24, 24, 24, 0.05);
}

.stat-card::before {
  content: "";
  height: 3px;
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  background: linear-gradient(90deg, var(--orange), rgba(244, 119, 24, 0.16));
}

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

.stat-card span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.stat-card strong {
  margin-top: 8px;
  font-size: 1.8rem;
  line-height: 1;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(320px, 390px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.menu-workspace-grid {
  display: grid;
  grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.commands-workspace-grid {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.form-stack {
  display: grid;
  gap: 18px;
}

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

.panel:hover {
  box-shadow: 0 22px 48px rgba(24, 24, 24, 0.1);
}

.form-panel {
  padding: 22px;
}

.compact-form {
  padding-bottom: 18px;
}

.category-form {
  display: grid;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid #eeeeee;
}

.category-form .field {
  margin-bottom: 0;
}

.compact-message {
  min-height: 18px;
  margin-top: 0;
  text-align: left;
}

.panel-heading {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.panel-heading h2 {
  font-size: 1.18rem;
  line-height: 1.2;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: inline-block;
  margin-bottom: 7px;
  font-size: 0.9rem;
  font-weight: 800;
}

.field input,
.field select,
.field textarea,
.search-field input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #ffffff;
  outline: 0;
}

.field input,
.field select,
.field textarea {
  min-height: 46px;
  padding: 0 12px;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.search-field:focus-within {
  border-color: var(--orange);
  box-shadow: var(--focus);
}

.field textarea {
  min-height: 86px;
  padding-top: 12px;
  resize: vertical;
}

.field small {
  min-height: 17px;
  display: block;
  margin-top: 5px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 700;
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea,
.field.has-error .password-control {
  border-color: rgba(189, 45, 34, 0.78);
}

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

.password-control {
  min-height: 46px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.password-control input {
  min-height: 44px;
  border: 0;
  box-shadow: none;
}

.password-control:focus-within {
  border-color: var(--orange);
  box-shadow: var(--focus);
}

.icon-button {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
}

.icon-button:hover {
  background: var(--orange-soft);
}

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

.primary-button {
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  box-shadow: 0 13px 28px rgba(244, 119, 24, 0.28);
  font-weight: 800;
}

.primary-button:hover {
  transform: translateY(-1px);
}

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

.secondary-action-button {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(244, 119, 24, 0.36);
  border-radius: 8px;
  color: var(--orange-dark);
  background: var(--orange-soft);
  font-weight: 800;
}

.secondary-action-button:hover {
  background: #ffe2cc;
}

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

.button-row .primary-button {
  min-width: 0;
}

.form-cancel {
  min-height: 48px;
  display: none;
}

.form-cancel.is-visible {
  display: inline-flex;
  align-items: center;
}

.form-message {
  min-height: 20px;
  margin-top: 14px;
  color: var(--green);
  font-size: 0.86rem;
  font-weight: 800;
  text-align: center;
}

.form-message.is-error {
  color: var(--red);
}

.temporary-login-preview {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -2px 0 16px;
  padding: 10px 12px;
  border: 1px solid #ffd6b8;
  border-radius: 8px;
  background: #fff4ec;
}

.temporary-login-preview span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.temporary-login-preview strong {
  color: var(--orange-dark);
  font-size: 0.95rem;
  font-weight: 900;
}

.temporary-admin-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #ffd6b8;
  border-radius: 8px;
  background: #fff4ec;
}

.temporary-admin-notice[hidden] {
  display: none !important;
}

.temporary-admin-notice strong {
  color: var(--orange-dark);
  font-size: 0.94rem;
  font-weight: 900;
}

.temporary-admin-notice span {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
  text-align: right;
}

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

.table-heading {
  align-items: center;
}

.search-field {
  width: min(260px, 100%);
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.search-field svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--muted);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.search-field input {
  min-height: 38px;
  padding: 0;
  border: 0;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid #eeeeee;
  border-radius: 8px;
}

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

th,
td {
  padding: 13px 10px;
  border-bottom: 1px solid #eeeeee;
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  background: var(--surface-muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

tbody tr:hover {
  background: #fffaf6;
}

tbody tr:last-child td {
  border-bottom: 0;
}

td {
  font-size: 0.9rem;
}

.name-cell strong,
.name-cell span {
  display: block;
}

.name-cell span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  color: #7a3304;
  background: var(--orange-soft);
  font-size: 0.78rem;
  font-weight: 800;
}

.badge.is-quiet {
  color: #3f3f3f;
  background: #eeeeee;
}

.category-stack {
  display: grid;
  justify-items: start;
  gap: 4px;
}

.production-text {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.2;
}

.status {
  color: var(--green);
  font-weight: 800;
}

.status.is-muted {
  color: var(--red);
}

.status.is-warning {
  color: var(--orange-dark);
}

.status.is-neutral {
  color: #4e4e4e;
}

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

.secondary-button,
.danger-button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  font-size: 0.82rem;
  font-weight: 800;
}

.secondary-button:hover {
  border-color: rgba(24, 24, 24, 0.24);
}

.danger-button {
  color: var(--red);
}

.secondary-button:hover,
.danger-button:hover {
  background: var(--surface-soft);
}

.empty-state {
  display: none;
  padding: 28px 0 12px;
  color: var(--muted);
  font-weight: 700;
  text-align: center;
}

.empty-state.is-visible {
  display: block;
}

.table-panel.is-empty .table-wrap {
  display: none;
}

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

.check-field {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 800;
}

.check-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--orange);
}

.category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.category-empty {
  width: 100%;
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.35;
}

.category-pill {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
}

.category-pill span {
  color: var(--muted);
  font-weight: 700;
}

.product-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.product-thumb {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid #eeeeee;
  border-radius: 8px;
  color: var(--orange-dark);
  background: var(--orange-soft);
  font-size: 0.8rem;
  font-weight: 900;
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-meta strong,
.product-meta span {
  display: block;
}

.product-meta span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
}

.price-text {
  font-weight: 900;
}

.products-table {
  min-width: 660px;
}

.tables-table {
  min-width: 620px;
}

.reports-table {
  min-width: 780px;
}

.report-panel {
  padding: 18px;
}

.report-filter-row {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(150px, 220px);
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.report-filter-field {
  margin-bottom: 0;
}

.report-filter-field[hidden] {
  display: none !important;
}

.report-items-cell {
  max-width: 320px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.35;
}

.waiter-workspace-grid {
  display: grid;
  gap: 18px;
  align-items: start;
}

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

.waiter-command-panel {
  max-width: 880px;
}

.waiter-command-panel .command-list {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.waiter-detail-view[hidden],
.waiter-menu-panel[hidden] {
  display: none !important;
}

.waiter-detail-view {
  display: grid;
  gap: 16px;
}

.waiter-detail-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.waiter-detail-toolbar div {
  display: grid;
  gap: 3px;
  text-align: right;
}

.waiter-detail-toolbar span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.waiter-detail-toolbar strong {
  font-size: 1.12rem;
}

.back-action-button {
  width: auto;
  min-width: 112px;
  padding: 0 14px;
}

.waiter-detail-grid {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.command-list,
.waiter-product-list,
.order-items {
  display: grid;
  gap: 10px;
}

.command-card {
  width: 100%;
  min-height: 76px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface-muted);
  text-align: left;
}

.command-card.is-active,
.command-card:hover {
  border-color: rgba(244, 119, 24, 0.62);
  box-shadow: 0 0 0 4px rgba(244, 119, 24, 0.12);
}

.command-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.command-card-top strong,
.command-card-meta {
  display: block;
}

.command-card-meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.category-tab {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: #ffffff;
  font-size: 0.82rem;
  font-weight: 800;
}

.category-tab.is-active,
.category-tab:hover {
  border-color: rgba(244, 119, 24, 0.44);
  color: var(--orange-dark);
  background: var(--orange-soft);
}

.waiter-product {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #eeeeee;
  border-radius: 8px;
  background: var(--surface-muted);
}

.waiter-product:hover,
.order-item:hover,
.waiter-order-card:hover,
.production-card:hover,
.cashier-command-card:hover {
  border-color: rgba(244, 119, 24, 0.42);
  box-shadow: 0 10px 24px rgba(24, 24, 24, 0.06);
}

.waiter-product-meta strong,
.waiter-product-meta span,
.waiter-product-meta b {
  display: block;
}

.waiter-product-meta strong {
  line-height: 1.2;
}

.waiter-product-meta span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
}

.waiter-product-meta b {
  margin-top: 4px;
  font-size: 0.9rem;
}

.selected-command {
  display: grid;
  gap: 5px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.selected-command span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.order-items {
  min-height: 120px;
  margin-bottom: 14px;
}

.order-items.is-scrollable {
  max-height: 154px;
  overflow-y: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
}

.order-items.is-scrollable::-webkit-scrollbar {
  width: 8px;
}

.order-items.is-scrollable::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(244, 119, 24, 0.42);
}

.order-empty {
  margin: 0;
  padding: 20px 0;
  color: var(--muted);
  text-align: center;
  font-weight: 700;
}

.order-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #eeeeee;
  border-radius: 8px;
  background: #ffffff;
}

.order-item-meta strong,
.order-item-meta span {
  display: block;
}

.order-item-meta span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.quantity-control {
  display: inline-grid;
  grid-template-columns: 30px 28px 30px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.quantity-control button {
  width: 30px;
  height: 30px;
  border: 0;
  background: #ffffff;
  font-weight: 900;
}

.quantity-control b {
  text-align: center;
  font-size: 0.86rem;
}

.order-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding-top: 12px;
  border-top: 1px solid #eeeeee;
}

.order-summary span {
  color: var(--muted);
  font-weight: 800;
}

.order-summary strong {
  font-size: 1.2rem;
}

.waiter-actions {
  display: grid;
  gap: 10px;
}

.waiter-orders-panel {
  max-width: 980px;
  padding: 18px;
}

.waiter-orders-panel[hidden] {
  display: none !important;
}

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

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

.waiter-order-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.waiter-order-card-header strong {
  line-height: 1.22;
}

.waiter-order-meta {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.waiter-order-card > b {
  color: var(--orange-dark);
  font-size: 1rem;
}

.waiter-order-items {
  display: grid;
  gap: 8px;
}

.waiter-order-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px;
  border: 1px solid #eeeeee;
  border-radius: 8px;
  background: var(--surface-muted);
}

.waiter-order-line.is-ready {
  border-color: rgba(35, 122, 75, 0.28);
  background: #eefaf2;
}

.waiter-order-line-meta strong,
.waiter-order-line-meta span {
  display: block;
}

.waiter-order-line-meta span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.waiter-ready-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  width: min(420px, calc(100vw - 44px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(35, 122, 75, 0.24);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.waiter-ready-toast[hidden] {
  display: none !important;
}

.waiter-ready-toast div {
  display: grid;
  gap: 3px;
}

.waiter-ready-toast span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.waiter-ready-toast button {
  width: auto;
  min-width: 72px;
  padding: 0 12px;
}

.danger-action-button {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(189, 45, 34, 0.32);
  border-radius: 8px;
  color: var(--red);
  background: #fff6f4;
  font-weight: 800;
}

.danger-action-button:hover {
  background: #ffe7e2;
}

.cashier-workspace-grid {
  display: grid;
  grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

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

.cashier-command-list,
.cashier-items {
  display: grid;
  gap: 10px;
}

.cashier-command-card {
  width: 100%;
  min-height: 76px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface-muted);
  text-align: left;
}

.cashier-command-card.is-active,
.cashier-command-card:hover {
  border-color: rgba(244, 119, 24, 0.62);
  box-shadow: 0 0 0 4px rgba(244, 119, 24, 0.12);
}

.cashier-command-card b {
  flex: 0 0 auto;
  font-size: 0.94rem;
}

.cashier-detail-panel {
  max-width: 760px;
}

.cashier-items {
  margin-bottom: 16px;
}

.split-bill-box {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.split-bill-box[hidden] {
  display: none !important;
}

.split-bill-box > span {
  color: var(--text);
  font-weight: 900;
}

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

.split-choice-group label {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  font-weight: 900;
}

.split-choice-group label:has(input:checked) {
  border-color: rgba(244, 119, 24, 0.5);
  color: var(--orange-dark);
  background: var(--orange-soft);
}

.cashier-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid #eeeeee;
}

.cashier-item b {
  font-size: 0.92rem;
}

.split-payment-item {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.split-quantity-control {
  display: inline-grid;
  grid-template-columns: 30px 30px 30px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.split-quantity-control button {
  width: 30px;
  height: 30px;
  border: 0;
  background: #ffffff;
  font-weight: 900;
}

.split-quantity-control button:disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.42;
}

.split-quantity-control b {
  text-align: center;
  font-size: 0.86rem;
}

.split-item-total {
  color: var(--orange-dark);
  font-size: 0.86rem;
  font-weight: 900;
  text-align: right;
}

.cashier-totals {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.cashier-totals div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.cashier-totals span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.cashier-totals strong {
  font-size: 1rem;
}

.cashier-paid-row[hidden],
.cashier-balance-row[hidden] {
  display: none !important;
}

.cashier-paid-control {
  width: min(170px, 58vw);
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.cashier-paid-control:focus-within {
  border-color: var(--orange);
  box-shadow: var(--focus);
}

.cashier-paid-control span {
  color: var(--muted);
  font-size: 0.82rem;
}

.cashier-paid-control input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-weight: 900;
  text-align: right;
}

.cashier-paid-control input:disabled {
  color: var(--muted);
}

.cashier-totals strong.is-change {
  color: var(--green);
}

.grill-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.kitchen-board {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.production-column {
  min-width: 0;
  padding: 18px;
}

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

.production-column-heading h2 {
  font-size: 1.08rem;
}

.production-column-heading span {
  min-width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--orange-dark);
  background: var(--orange-soft);
  font-weight: 900;
}

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

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

.production-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.production-card-header strong {
  line-height: 1.22;
}

.production-card-header span {
  flex: 0 0 auto;
  color: var(--orange-dark);
  font-weight: 900;
}

.production-meta {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.production-note {
  margin: 0;
  padding: 9px;
  border-radius: 8px;
  color: var(--text);
  background: #ffffff;
  font-size: 0.84rem;
  font-weight: 700;
}

.production-timer {
  min-height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(24, 24, 24, 0.1);
  border-radius: 8px;
  color: #ffffff;
  background: #222222;
  font-size: 0.86rem;
  font-weight: 900;
}

.production-timer.is-late {
  border-color: rgba(189, 45, 34, 0.24);
  color: var(--red);
  background: #fff6f4;
}

.production-ready-chip {
  min-height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--green);
  background: #eefaf2;
  font-weight: 900;
}

.primary-button:disabled,
.secondary-action-button:disabled,
.danger-action-button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
  transform: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(244, 119, 24, 0.34);
  outline-offset: 2px;
}

.products-table th,
.products-table td {
  padding-left: 8px;
  padding-right: 8px;
}

.products-table .row-actions {
  gap: 6px;
}

.products-table .secondary-button,
.products-table .danger-button {
  padding: 0 8px;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
  }

  .brand {
    margin-bottom: 0;
  }

  .nav-list {
    display: flex;
    overflow-x: auto;
  }

  .nav-link {
    white-space: nowrap;
  }

  .workspace-grid,
  .menu-workspace-grid,
  .commands-workspace-grid,
  .waiter-workspace-grid,
  .waiter-detail-grid,
  .cashier-workspace-grid,
  .grill-board {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .main-content {
    padding: 18px;
  }

  .topbar,
  .table-heading,
  .temporary-admin-notice {
    align-items: stretch;
    flex-direction: column;
  }

  .temporary-admin-notice span {
    text-align: left;
  }

  .owner-chip {
    width: 100%;
  }

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

  .field-grid,
  .toggle-grid,
  .report-filter-row,
  .button-row {
    grid-template-columns: 1fr;
  }

  .form-cancel.is-visible {
    justify-content: center;
  }

  .sidebar {
    align-items: stretch;
    flex-direction: column;
  }

  .search-field {
    width: 100%;
  }

  .waiter-detail-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .waiter-detail-toolbar div {
    text-align: left;
  }

  .back-action-button {
    width: 100%;
  }

  .waiter-ready-toast {
    right: 14px;
    bottom: 14px;
    width: calc(100vw - 28px);
    align-items: stretch;
    flex-direction: column;
  }

  .waiter-ready-toast button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
