:root {
  --bg: #0f172a;
  --bg-soft: #111c33;
  --card: #1e293b;
  --card-soft: #233149;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --line: #334155;
  --line-soft: #3f4c64;
  --emerald: #10b981;
  --emerald-soft: rgba(16, 185, 129, 0.16);
  --gold: #fbbf24;
  --danger: #ef4444;
  --shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
  --radius-xl: 16px;
  --radius-lg: 12px;
  --radius-md: 10px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Inter", "Poppins", sans-serif;
  background:
    radial-gradient(circle at 10% 0%, rgba(16, 185, 129, 0.14) 0, transparent 22%),
    radial-gradient(circle at 90% 100%, rgba(251, 191, 36, 0.12) 0, transparent 20%),
    var(--bg);
  color: var(--text);
}

body.auth-locked {
  overflow: hidden;
}

body.auth-locked .exec-header,
body.auth-locked .page,
body.auth-locked .mobile-cost-sheet,
body.auth-locked .app-toast {
  filter: blur(3px);
  pointer-events: none;
  user-select: none;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at 20% 10%, rgba(16, 185, 129, 0.2), transparent 28%),
    radial-gradient(circle at 82% 90%, rgba(251, 191, 36, 0.18), transparent 28%),
    rgba(2, 6, 23, 0.92);
  backdrop-filter: blur(6px);
}

.auth-gate.is-hidden {
  display: none;
}

.auth-gate-card {
  width: min(980px, 96vw);
  border: 1px solid rgba(71, 85, 105, 0.78);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(30, 41, 59, 0.98) 0%, rgba(15, 23, 42, 0.98) 100%);
  box-shadow: 0 24px 48px rgba(2, 6, 23, 0.55);
  padding: 20px;
  display: grid;
  gap: 10px;
}

.auth-eyebrow {
  margin: 0;
  color: #86efac;
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-weight: 800;
}

.auth-gate-card h1 {
  margin: 0;
  font-family: "Poppins", "Inter", sans-serif;
  font-size: clamp(1.45rem, 3vw, 1.8rem);
  color: #f8fafc;
}

.auth-subtitle {
  margin: 0 0 4px;
  color: #b7c4d8;
  font-size: 0.9rem;
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-form.is-hidden {
  display: none;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 16px;
  align-items: stretch;
}

.auth-main {
  display: grid;
  gap: 10px;
}

.auth-step-indicator {
  margin: -2px 0 4px;
  width: fit-content;
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.14);
  padding: 4px 10px;
  color: #dbeafe;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.auth-login-fallback {
  margin-top: 2px;
  border: 1px solid rgba(71, 85, 105, 0.7);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.42);
  padding: 8px 10px;
}

.auth-login-fallback.is-hidden {
  display: none;
}

.auth-login-fallback summary {
  cursor: pointer;
  color: #dbe8f8;
  font-size: 0.8rem;
  font-weight: 700;
  list-style: none;
}

.auth-login-fallback summary::-webkit-details-marker {
  display: none;
}

.auth-login-fallback[open] summary {
  margin-bottom: 8px;
}

.auth-register {
  margin-top: 2px;
  border: 1px solid rgba(71, 85, 105, 0.78);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.48);
  padding: 8px 10px;
}

.auth-register.is-hidden {
  display: none;
}

.auth-register summary {
  cursor: pointer;
  color: #dbe8f8;
  font-size: 0.8rem;
  font-weight: 700;
  list-style: none;
}

.auth-register summary::-webkit-details-marker {
  display: none;
}

.auth-register[open] summary {
  margin-bottom: 8px;
}

.auth-form-register {
  margin-top: 2px;
}

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

.auth-field span {
  font-size: 0.78rem;
  color: #dbe8f8;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.auth-field input,
.auth-field select {
  min-height: 44px;
  border: 1px solid #40526c;
  border-radius: 10px;
  background: linear-gradient(180deg, #122136 0%, #0e1b2f 100%);
  color: #e2e8f0;
  padding: 9px 12px;
  font-size: 0.95rem;
}

.auth-field input:focus,
.auth-field select:focus {
  outline: none;
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}

.auth-error {
  margin: 0;
  min-height: 20px;
  color: #fca5a5;
  font-size: 0.79rem;
  font-weight: 700;
}

.auth-submit-btn {
  min-height: 44px;
  border: 1px solid rgba(16, 185, 129, 0.58);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.3) 0%, #11353f 100%);
  color: #ecfdf5;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  transition: 0.16s ease;
}

.auth-submit-btn:hover {
  border-color: rgba(52, 211, 153, 0.72);
  transform: translateY(-1px);
}

.auth-form-inline .auth-submit-btn {
  min-width: 170px;
}

.auth-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.auth-link-btn {
  min-height: 42px;
  border: 1px solid #4b5f7d;
  border-radius: 10px;
  background: #121f33;
  color: #dbeafe;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0 14px;
  cursor: pointer;
  transition: 0.16s ease;
}

.auth-link-btn:hover {
  border-color: rgba(56, 189, 248, 0.72);
  color: #eff6ff;
}

.auth-inline-note,
.auth-microcopy {
  margin: 0;
  color: #9fb4cf;
  font-size: 0.78rem;
  font-weight: 600;
}

.auth-note {
  margin: 2px 0 0;
  color: #9fb4cf;
  font-size: 0.76rem;
}

.auth-side-panel {
  border: 1px solid rgba(71, 85, 105, 0.72);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(14, 27, 47, 0.78) 0%, rgba(11, 22, 38, 0.88) 100%);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.auth-side-panel img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(71, 85, 105, 0.72);
  object-fit: cover;
}

.auth-side-title {
  margin: 0;
  color: #f8fafc;
  font-size: 0.9rem;
  font-weight: 800;
}

.auth-benefit-list {
  margin: 0;
  padding-left: 18px;
  color: #d6e4f7;
  display: grid;
  gap: 4px;
  font-size: 0.82rem;
  font-weight: 700;
}

.auth-roi-line {
  margin: 0;
  border: 1px dashed rgba(34, 197, 94, 0.52);
  border-radius: 10px;
  background: rgba(34, 197, 94, 0.12);
  color: #dcfce7;
  padding: 9px 10px;
  font-size: 0.79rem;
  font-weight: 700;
  line-height: 1.35;
}

@media (max-width: 940px) {
  .auth-gate-card {
    width: min(560px, 96vw);
  }

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

  .auth-side-panel {
    display: none;
  }
}

@media (max-width: 560px) {
  .auth-gate {
    padding: 14px;
  }

  .auth-gate-card {
    border-radius: 14px;
    padding: 14px;
  }

  .auth-submit-btn,
  .auth-link-btn {
    width: 100%;
  }

  .auth-inline-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .auth-field input,
  .auth-field select {
    min-height: 46px;
    font-size: 0.98rem;
  }
}

#auth-logout-btn.is-hidden {
  display: none;
}

.exec-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  min-height: 74px;
  padding: 12px min(3vw, 32px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.exec-header-left {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.exec-header-left p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 3px 8px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.status-draft {
  color: #fef3c7;
  background: rgba(251, 191, 36, 0.14);
  border-color: rgba(251, 191, 36, 0.4);
}

.status-ready {
  color: #dcfce7;
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.45);
}

.status-missing {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.5);
}

.exec-header-left strong {
  color: var(--text);
  font-weight: 700;
}

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

.header-action-btn {
  border: 1px solid var(--line-soft);
  background: var(--card);
  color: var(--text);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

.header-action-btn[data-bottom-action="quotation"] {
  border-color: rgba(16, 185, 129, 0.6);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.28) 0%, #12363a 100%);
  color: #ecfdf5;
}

.header-action-btn[data-bottom-action="quotation-share"] {
  border-color: rgba(56, 189, 248, 0.55);
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.2) 0%, #163248 100%);
  color: #dbeafe;
}

.header-action-btn[data-bottom-action="grocery"] {
  border-color: rgba(251, 191, 36, 0.55);
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.2) 0%, #3a3218 100%);
  color: #fef3c7;
}

.header-action-btn[data-header-action="export-backup"] {
  border-color: rgba(148, 163, 184, 0.55);
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.18) 0%, #202f46 100%);
  color: #e2e8f0;
}

.header-action-btn[data-header-action="import-backup"] {
  border-color: rgba(56, 189, 248, 0.55);
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.2) 0%, #163248 100%);
  color: #dbeafe;
}

.header-action-btn[data-header-action="reset-booking"] {
  border-color: rgba(248, 113, 113, 0.5);
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.2) 0%, #3b1f29 100%);
  color: #fee2e2;
}

.header-action-btn:hover {
  transform: translateY(-1px);
  border-color: var(--emerald);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
}

.page {
  width: min(1380px, 96vw);
  margin: 18px auto 90px;
}

.screen-switcher {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
  padding: 8px;
  border: 1px solid rgba(71, 85, 105, 0.62);
  border-radius: 12px;
  background: linear-gradient(180deg, #1b2b43 0%, #16253b 100%);
}

.screen-switch-btn {
  border: 1px solid rgba(83, 102, 131, 0.8);
  border-radius: 10px;
  background: #13233a;
  color: #d8e3f1;
  font-size: 0.8rem;
  font-weight: 700;
  min-height: 40px;
  cursor: pointer;
  transition: 0.16s ease;
}

.screen-switch-btn.is-active {
  border-color: var(--emerald);
  background: rgba(16, 185, 129, 0.2);
  color: #ecfdf5;
}

.exec-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}

.exec-layout > .workspace-left {
  grid-column: 1;
}

.exec-layout > .workspace-right {
  grid-column: 1;
}

.workspace-left,
.workspace-right {
  display: grid;
  gap: 14px;
}

.workspace-right {
  display: none;
  position: static;
  max-height: unset;
  overflow: visible;
  border-left: 0;
  padding: 0;
}

body.screen-view-right .workspace-right {
  display: grid;
}

body.screen-view-left .workspace-right {
  display: none;
}

body.screen-view-right .workspace-left {
  display: none;
}

.workspace-right::-webkit-scrollbar {
  width: 7px;
}

.workspace-right::-webkit-scrollbar-track {
  background: transparent;
}

.workspace-right::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #4b5d78 0%, #344359 100%);
  border-radius: 999px;
}

.workspace-right.scrollbar-hidden {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.workspace-right.scrollbar-hidden::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.event-section,
.menu-section,
.cost-summary-card,
.extra-cost-card,
.ingredient-rate-card,
.labour-card,
.per-plate-card,
.bi-card,
.bottom-action-card,
.function-menu-card,
.final-selection {
  background: linear-gradient(180deg, var(--card) 0%, #1b2638 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.event-section,
.menu-section {
  padding: 18px;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  color: var(--gold);
  font-weight: 700;
}

.event-header h2,
.menu-header h1 {
  margin: 6px 0 0;
  font-family: "Poppins", "Inter", sans-serif;
  color: #f8fafc;
}

.event-header h2 {
  font-size: clamp(1.2rem, 2.2vw, 1.6rem);
}

.menu-header h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.menu-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.menu-selection-summary {
  margin: 6px 0 0;
  color: #c7d2e2;
  font-size: 0.88rem;
  font-weight: 600;
}

.menu-search-field {
  margin-top: 10px;
  display: grid;
  gap: 6px;
  max-width: 440px;
}

.menu-search-field span {
  font-size: 0.72rem;
  color: #b7c4d8;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
}

.menu-search-field input {
  width: 100%;
  min-height: 40px;
  border: 1px solid #40526c;
  border-radius: 10px;
  background: linear-gradient(180deg, #122136 0%, #0e1b2f 100%);
  color: #e2e8f0;
  padding: 8px 11px;
  font-size: 0.9rem;
}

.menu-search-field input::placeholder {
  color: #8da0b8;
}

.menu-search-field input:focus {
  outline: none;
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}

.category-manager {
  margin-top: 12px;
  border: 1px solid rgba(67, 88, 114, 0.62);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(21, 34, 55, 0.86) 0%, rgba(15, 24, 40, 0.92) 100%);
  padding: 10px;
  display: grid;
  gap: 8px;
}

.category-manager h3 {
  margin: 0;
  color: #d8e4f2;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.category-manager-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(150px, 1fr) auto auto;
  gap: 8px;
}

.category-manager-row:first-of-type {
  grid-template-columns: minmax(240px, 1fr) auto;
}

.category-manager-row-actions {
  grid-template-columns: auto;
}

.category-manager-row-actions .category-manager-btn {
  justify-self: start;
}

.category-manager input,
.category-manager select {
  min-height: 38px;
  border: 1px solid #40526c;
  border-radius: 10px;
  background: linear-gradient(180deg, #122136 0%, #0e1b2f 100%);
  color: #e2e8f0;
  padding: 8px 10px;
  font-size: 0.86rem;
}

.category-manager-btn {
  min-height: 38px;
  border: 1px solid rgba(16, 185, 129, 0.48);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.22) 0%, #10313d 100%);
  color: #dcfce7;
  padding: 0 12px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.category-manager-btn.danger {
  border-color: rgba(248, 113, 113, 0.5);
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.2) 0%, #3b1f29 100%);
  color: #fee2e2;
}

.category-manager-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.event-manager {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card-soft);
  padding: 10px;
  margin-top: 14px;
}

.event-manager-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.event-manager-head h3 {
  margin: 0;
  color: #dbe3ef;
  font-size: 0.9rem;
}

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

.event-add-btn {
  border: 1px solid #3f4c64;
  border-radius: 999px;
  background: #1b2638;
  color: #d6dfec;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 6px 10px;
  cursor: pointer;
  transition: 0.16s ease;
}

.event-add-btn:hover {
  border-color: var(--emerald);
  color: #f0fdf4;
  transform: translateY(-1px);
}

.event-add-btn[data-event-action="duplicate"] {
  border-color: rgba(56, 189, 248, 0.48);
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.16) 0%, #183044 100%);
}

.event-add-btn[data-event-action="delete"] {
  border-color: rgba(248, 113, 113, 0.44);
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.16) 0%, #38222c 100%);
}

.event-add-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.event-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}

.event-tabs::-webkit-scrollbar {
  display: none;
}

.event-tab {
  border: 1px solid var(--line);
  background: #1a2436;
  border-radius: var(--radius-md);
  padding: 8px 10px;
  min-width: 170px;
  cursor: pointer;
  text-align: left;
  scroll-snap-align: start;
  transition: 0.18s ease;
}

.event-tab.is-active {
  border-color: var(--emerald);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.22);
  background: #102433;
}

.event-tab:hover {
  border-color: #4a607f;
  transform: translateY(-1px);
}

.event-tab-title {
  display: block;
  color: #f1f5f9;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-tab-meta {
  display: block;
  margin-top: 2px;
  color: #91a0b4;
  font-size: 0.74rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-form {
  margin-top: 14px;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field span {
  font-size: 0.74rem;
  color: #a5b4c8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.field input,
.field select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #111b2e;
  color: var(--text);
  padding: 9px 11px;
  font-size: 0.9rem;
}

.field input::placeholder {
  color: #8da0b8;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.field-full {
  grid-column: 1 / -1;
}

.field-helper {
  color: #93a4bb;
  font-size: 0.75rem;
  font-weight: 600;
}

.field-guest.is-required-missing input {
  border-color: rgba(239, 68, 68, 0.75);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.field-guest.is-required-missing .field-helper {
  color: #fecaca;
}

.event-function-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.event-function-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #3a4a61;
  border-radius: 999px;
  background: #162237;
  padding: 6px 10px;
  color: #d8e0eb;
  font-size: 0.82rem;
  cursor: pointer;
}

.event-function-option input {
  margin: 0;
  accent-color: var(--emerald);
}

.event-function-option:has(input:checked) {
  border-color: var(--emerald);
  background: rgba(16, 185, 129, 0.14);
}

#event-function-value[readonly] {
  background: #0f172a;
  border-style: dashed;
}

.function-guest-section {
  margin-top: 10px;
  border: 1px dashed #3a4a61;
  border-radius: 10px;
  background: #101b2f;
  padding: 9px 10px;
}

.function-guest-title {
  margin: 0;
  color: #d1fae5;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.function-guest-grid {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
}

.function-guest-item {
  border: 1px solid #35485f;
  border-radius: 9px;
  background: #162338;
  padding: 7px;
  display: grid;
  gap: 5px;
}

.function-guest-item.is-active {
  border-color: var(--emerald);
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.25);
}

.function-guest-item-label {
  color: #dbe6f5;
  font-size: 0.76rem;
  font-weight: 700;
}

.function-guest-item input {
  width: 100%;
  min-height: 34px;
  border: 1px solid #40546f;
  border-radius: 8px;
  background: #101a2d;
  color: #e2e8f0;
  padding: 6px 8px;
  font-size: 0.82rem;
}

.function-guest-note {
  margin: 8px 0 0;
  color: #96a9c3;
  font-size: 0.74rem;
}

.menu-filters,
.function-menu-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

.menu-filters::-webkit-scrollbar,
.function-menu-tabs::-webkit-scrollbar {
  display: none;
}

.menu-filters {
  margin-top: 12px;
  position: sticky;
  top: 76px;
  z-index: 8;
  padding: 8px 0;
  background: linear-gradient(
    180deg,
    rgba(30, 41, 59, 0.98) 0%,
    rgba(30, 41, 59, 0.92) 75%,
    rgba(30, 41, 59, 0) 100%
  );
}

.filter-btn,
.function-menu-tab {
  border: 1px solid #3a4a61;
  border-radius: 999px;
  background: #162237;
  color: #d8e0eb;
  padding: 7px 12px;
  font-size: 0.81rem;
  font-weight: 700;
  cursor: pointer;
  transition: 0.16s ease;
  scroll-snap-align: start;
}

.filter-btn.is-active,
.function-menu-tab.is-active {
  border-color: var(--emerald);
  background: rgba(16, 185, 129, 0.2);
  color: #ecfdf5;
}

.function-menu-card {
  margin-top: 12px;
  padding: 12px;
}

.function-menu-card h3,
.final-selection h3,
.cost-summary-card h3,
.extra-cost-card summary,
.labour-card h3,
.per-plate-card h3,
.bi-card h3 {
  margin: 0;
  color: #f8fafc;
  font-size: 0.95rem;
}

.function-menu-note {
  margin: 8px 0 0;
  color: #94a3b8;
  font-size: 0.8rem;
}

.menu-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.menu-subcategory-heading {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #456282;
  border-radius: var(--radius-md);
  background: linear-gradient(90deg, #173049 0%, #1f3953 100%);
  padding: 9px 12px;
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.08);
}

.menu-subcategory-heading.is-hidden {
  display: none;
}

.menu-subcategory-title {
  color: #f8fafc;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.menu-subcategory-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.menu-subcategory-count {
  color: #c7d8ec;
  font-size: 0.75rem;
  border: 1px solid #5a7190;
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(15, 23, 42, 0.4);
}

.subcategory-delete-btn {
  border: 1px solid rgba(239, 68, 68, 0.5);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.2) 0%, #3b1a22 100%);
  color: #fecaca;
  padding: 4px 9px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: 0.16s ease;
}

.subcategory-delete-btn:hover {
  border-color: rgba(248, 113, 113, 0.75);
  color: #fee2e2;
}

.menu-card {
  border: 1px solid #3a4a61;
  border-radius: var(--radius-lg);
  background: #152033;
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: start;
  transition: 0.2s ease;
}

.menu-card.is-hidden {
  display: none;
}

.menu-card:hover {
  border-color: #4d607c;
  transform: translateY(-1px);
}

.menu-card.is-selected {
  border-color: var(--emerald);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2), 0 12px 24px rgba(0, 0, 0, 0.28);
}

.menu-card-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.menu-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dish-edit-btn {
  border: 1px solid rgba(56, 189, 248, 0.52);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.2) 0%, #173248 100%);
  color: #dbeafe;
  padding: 4px 9px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: 0.16s ease;
}

.dish-edit-btn:hover {
  border-color: rgba(16, 185, 129, 0.66);
  color: #effdf6;
}

.dish-delete-btn {
  border: 1px solid rgba(239, 68, 68, 0.52);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.2) 0%, #3a1a22 100%);
  color: #fecaca;
  padding: 4px 9px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: 0.16s ease;
}

.dish-delete-btn:hover {
  border-color: rgba(248, 113, 113, 0.75);
  color: #fee2e2;
}

.menu-card h2 {
  margin: 0;
  font-size: 0.98rem;
  color: #f8fafc;
}

.menu-card > span {
  font-size: 0.84rem;
  font-weight: 800;
  color: #fef3c7;
  border: 1px solid #66542e;
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(251, 191, 36, 0.15);
  white-space: nowrap;
}

.menu-meta {
  margin: 4px 0 0;
  font-size: 0.83rem;
  color: #a4b3c8;
}

.dish-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.77rem;
  color: #c8d3e1;
  border: 1px solid #3b4c64;
  border-radius: 999px;
  padding: 3px 8px;
  background: #101a2d;
}

.dish-check input {
  margin: 0;
  width: 15px;
  height: 15px;
  accent-color: var(--emerald);
}

.ingredient-details {
  margin-top: 8px;
  border-top: 1px dashed #3c4c65;
  padding-top: 7px;
}

.ingredient-details summary {
  font-size: 0.8rem;
  color: #f8fafc;
  cursor: pointer;
}

.ingredient-list {
  margin: 8px 0 0;
  padding-left: 16px;
  color: #95a6bd;
  font-size: 0.78rem;
  line-height: 1.4;
}

.portion-control {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #3d4e67;
  border-radius: 999px;
  background: #102338;
  width: fit-content;
  padding: 3px 5px;
}

.portion-control.is-hidden {
  display: none;
}

.portion-label {
  font-size: 0.73rem;
  color: #a7b7cb;
  margin-right: 3px;
}

.portion-btn {
  border: 1px solid #475a76;
  background: #18263c;
  color: #e5edf8;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 700;
  line-height: 1;
}

.portion-value {
  min-width: 46px;
  text-align: center;
  font-size: 0.78rem;
  color: #f1f5f9;
  font-weight: 700;
}

.final-selection {
  margin-top: 12px;
  padding: 12px;
}

.final-selection-empty {
  margin: 0;
  color: #94a3b8;
  font-size: 0.86rem;
}

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

.final-function-block {
  border: 1px solid #34465f;
  border-radius: var(--radius-md);
  background: #182338;
  padding: 10px;
}

.final-category-block + .final-category-block {
  margin-top: 8px;
}

.final-function-title {
  margin: 0 0 7px;
  font-size: 0.85rem;
  color: #f8fafc;
}

.final-function-total {
  margin: 0 0 7px;
  color: #d1fae5;
  font-size: 0.79rem;
  font-weight: 700;
}

.final-category-title {
  margin: 8px 0 6px;
  font-size: 0.8rem;
  color: #c7d2e2;
}

.final-dish-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.final-dish-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #31445e;
  border-radius: 9px;
  padding: 7px 8px;
  background: #101b2f;
}

.final-dish-name {
  font-size: 0.82rem;
  color: #e2e8f0;
}

.final-remove-btn {
  border: 1px solid #4d607c;
  border-radius: 8px;
  background: #1d2c44;
  color: #fecaca;
  width: 24px;
  height: 24px;
  cursor: pointer;
}

.cost-summary-card,
.ingredient-rate-card,
.labour-card,
.per-plate-card,
.bi-card,
.bottom-action-card,
.extra-cost-card {
  padding: 12px;
}

.ingredient-rate-note {
  margin: 8px 0 0;
  color: #9fb0c8;
  font-size: 0.78rem;
}

.ingredient-rate-table-wrap {
  margin-top: 8px;
  max-height: 220px;
  overflow: auto;
  border: 1px solid #33465f;
  border-radius: 10px;
}

.ingredient-rate-table {
  width: 100%;
  border-collapse: collapse;
}

.ingredient-rate-table th,
.ingredient-rate-table td {
  padding: 8px;
  border-bottom: 1px solid #33465f;
  font-size: 0.79rem;
  color: #d8e2f0;
}

.ingredient-rate-table th {
  position: sticky;
  top: 0;
  background: #19263a;
  text-align: left;
  z-index: 1;
}

.ingredient-rate-table input {
  width: 100%;
  min-height: 32px;
  border: 1px solid #40546f;
  border-radius: 8px;
  background: #101a2d;
  color: #e2e8f0;
  padding: 6px 8px;
  font-size: 0.8rem;
}

.cost-summary-card {
  border-color: #2f425f;
}

.cost-big-number {
  margin-top: 10px;
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
  color: #ecfdf5;
}

.cost-big-label {
  margin: 4px 0 0;
  color: #9fb0c8;
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.cost-big-note {
  margin: 8px 0 0;
  font-size: 0.82rem;
  color: #facc15;
}

.cost-change-note {
  margin: 8px 0 0;
  font-size: 0.78rem;
  color: #d1fae5;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  min-height: 18px;
}

.cost-change-note.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.cost-summary-card.is-pulse {
  animation: costPulse 0.34s ease;
}

@keyframes costPulse {
  0% {
    box-shadow: var(--shadow);
  }
  45% {
    box-shadow:
      0 0 0 2px rgba(16, 185, 129, 0.25),
      0 16px 36px rgba(0, 0, 0, 0.38);
  }
  100% {
    box-shadow: var(--shadow);
  }
}

.cost-breakdown-grid {
  margin-top: 12px;
  display: grid;
  gap: 7px;
}

.cost-breakdown-grid p {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.84rem;
  color: #c7d2e2;
  border-bottom: 1px dashed #3a4c66;
  padding-bottom: 6px;
}

.cost-breakdown-grid span {
  color: #f8fafc;
  font-weight: 700;
}

.warning-box {
  margin-top: 10px;
  display: grid;
  gap: 6px;
}

.warning-item {
  border: 1px solid rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.14);
  color: #fecaca;
  border-radius: 9px;
  padding: 7px 8px;
  font-size: 0.8rem;
}

.warning-box-side {
  margin-top: 0;
}

.extra-cost-card summary {
  cursor: pointer;
  list-style: none;
}

.extra-cost-card summary::-webkit-details-marker {
  display: none;
}

.ingredient-rate-card summary {
  cursor: pointer;
  list-style: none;
  color: #f8fafc;
  font-size: 0.95rem;
  font-weight: 700;
}

.ingredient-rate-card summary::-webkit-details-marker {
  display: none;
}

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

.extra-cost-total,
.labour-grand-total,
.per-plate-line.is-strong {
  margin: 10px 0 0;
  color: #ecfdf5;
  font-weight: 700;
}

.labour-table-wrap {
  overflow-x: auto;
  margin-top: 8px;
}

.labour-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  list-style: none;
}

.labour-summary::-webkit-details-marker {
  display: none;
}

.labour-summary-total {
  color: #dcfce7;
  font-weight: 700;
  font-size: 0.83rem;
}

.labour-summary-edit {
  color: #d8e0eb;
  border: 1px solid #3e4f67;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.74rem;
  font-weight: 700;
  background: #14253b;
}

.labour-card:not([open]) .labour-grand-total {
  margin-top: 0;
}

.labour-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  border: 1px solid #3b4c65;
  border-radius: 10px;
  overflow: hidden;
}

.labour-table th,
.labour-table td {
  border-bottom: 1px solid #33455f;
  padding: 8px;
  font-size: 0.8rem;
  color: #d7e1ef;
}

.labour-table th {
  background: #19263a;
  text-align: left;
}

.labour-table tbody tr:nth-child(odd) td {
  background: rgba(18, 30, 47, 0.55);
}

.labour-input {
  width: 100%;
  min-height: 34px;
  border: 1px solid #3e4f67;
  border-radius: 8px;
  background: #101a2c;
  color: #e2e8f0;
  padding: 6px 8px;
  font-size: 0.8rem;
}

.labour-auto-cell {
  text-align: center;
}

.labour-auto {
  accent-color: var(--emerald);
}

.per-plate-line {
  margin: 6px 0 0;
  color: #c4d1e4;
  font-size: 0.84rem;
}

.per-plate-note {
  margin: 8px 0 0;
  color: #94a3b8;
  font-size: 0.8rem;
}

.bi-grid {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.bi-grid p {
  margin: 0;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #c7d2e2;
  font-size: 0.84rem;
  border-bottom: 1px dashed #3a4c66;
  padding-bottom: 6px;
}

.bi-grid span {
  color: #f8fafc;
  font-weight: 700;
}

.bi-note {
  margin: 10px 0 0;
  color: #9fb0c8;
  font-size: 0.76rem;
  line-height: 1.35;
}

.bi-optimization {
  margin-top: 10px;
  border: 1px solid #3b4d66;
  border-radius: 10px;
  background: #142136;
  padding: 9px 10px;
}

.bi-optimization h4 {
  margin: 0;
  color: #ecfdf5;
  font-size: 0.79rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.bi-optimization ul {
  margin: 8px 0 0;
  padding-left: 17px;
  display: grid;
  gap: 6px;
}

.bi-optimization li {
  color: #c7d2e2;
  font-size: 0.78rem;
  line-height: 1.35;
}

.profit-slider-wrap {
  margin-top: 10px;
  display: grid;
  gap: 8px;
  color: #c7d2e2;
  font-size: 0.84rem;
}

#profit-slider {
  width: 100%;
  accent-color: var(--emerald);
}

.bottom-action-card {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.bottom-action-btn {
  border: 1px solid #3c4d66;
  border-radius: 10px;
  background: #162237;
  color: #dce5f2;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 9px 10px;
  cursor: pointer;
  transition: 0.16s ease;
}

.bottom-action-btn:hover {
  border-color: var(--emerald);
  transform: translateY(-1px);
}

.bottom-action-btn[data-bottom-action="quotation"] {
  border-color: rgba(16, 185, 129, 0.62);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.23) 0%, #113238 100%);
  color: #ecfdf5;
}

.bottom-action-btn[data-bottom-action="quotation-share"] {
  border-color: rgba(56, 189, 248, 0.55);
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.2) 0%, #163248 100%);
  color: #dbeafe;
}

.mobile-cost-sheet {
  display: none;
}

.mobile-sheet-toggle {
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.35);
  color: inherit;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
}

.mobile-sheet-body {
  margin-top: 10px;
  border-top: 1px solid rgba(71, 85, 105, 0.45);
  padding-top: 10px;
  display: none;
  color: #d5dfed;
  font-size: 0.83rem;
  max-height: min(58vh, 460px);
  overflow: auto;
}

.mobile-cost-sheet.is-open .mobile-sheet-body {
  display: block;
}

.mobile-sheet-metrics {
  display: grid;
  gap: 6px;
}

.mobile-sheet-metrics p {
  margin: 0;
}

.mobile-quick-edit {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mobile-quick-field {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(80, 101, 130, 0.58);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(22, 36, 56, 0.95) 0%, rgba(17, 28, 45, 0.96) 100%);
  padding: 7px;
}

.mobile-quick-field span {
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: #bdd0e8;
}

.mobile-quick-field input {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(87, 111, 142, 0.72);
  border-radius: 9px;
  background: #101b2f;
  color: #f8fafc;
  padding: 9px 10px;
  font-size: 0.9rem;
}

.mobile-quick-field:first-child {
  grid-column: 1 / -1;
}

.mobile-quick-actions {
  margin-top: 9px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.mobile-quick-btn {
  min-height: 42px;
  border: 1px solid rgba(90, 114, 145, 0.72);
  border-radius: 10px;
  background: linear-gradient(180deg, #1a2a41 0%, #142235 100%);
  color: #e2e8f0;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 8px 6px;
  cursor: pointer;
}

.mobile-quick-btn:active {
  transform: translateY(1px);
}

.dish-editor-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(4px);
}

.dish-editor-modal.is-hidden {
  display: none;
}

.dish-editor-dialog {
  width: min(760px, 100%);
  max-height: min(88vh, 900px);
  overflow: auto;
  border: 1px solid rgba(71, 85, 105, 0.72);
  border-radius: 14px;
  background: linear-gradient(180deg, #22344f 0%, #16263e 100%);
  box-shadow: 0 20px 36px rgba(2, 6, 23, 0.58);
  padding: 14px;
}

.dish-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dish-editor-head h3 {
  margin: 0;
  color: #f8fafc;
  font-size: 1rem;
}

.dish-editor-close {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(96, 115, 140, 0.74);
  border-radius: 8px;
  background: #122135;
  color: #dbe8f8;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.dish-editor-form {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

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

.dish-editor-grid textarea {
  width: 100%;
  border: 1px solid rgba(75, 93, 120, 0.76);
  border-radius: 10px;
  background: linear-gradient(180deg, #121f33 0%, #0e1a2c 100%);
  color: #e2e8f0;
  padding: 10px 11px;
  font-size: 0.85rem;
  line-height: 1.35;
  resize: vertical;
}

.dish-editor-note {
  margin: 0;
  color: #a9bbd3;
  font-size: 0.78rem;
}

.dish-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.dish-editor-actions #dish-editor-save {
  border-color: rgba(16, 185, 129, 0.55);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.22) 0%, #10313d 100%);
  color: #dcfce7;
}

#saas-settings-btn.is-hidden {
  display: none;
}

.saas-settings-modal {
  position: fixed;
  inset: 0;
  z-index: 75;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(4px);
}

.saas-settings-modal.is-hidden {
  display: none;
}

.saas-settings-dialog {
  width: min(1120px, 100%);
  max-height: min(90vh, 920px);
  overflow: auto;
  border: 1px solid rgba(72, 89, 117, 0.72);
  border-radius: 14px;
  background: linear-gradient(180deg, #22344f 0%, #16263e 100%);
  box-shadow: 0 20px 36px rgba(2, 6, 23, 0.58);
  padding: 14px;
  display: grid;
  gap: 12px;
}

.saas-settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.saas-settings-head h3 {
  margin: 0;
  color: #f8fafc;
  font-size: 1rem;
}

.saas-settings-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(360px, 1.25fr) minmax(240px, 1fr);
  gap: 10px;
}

.saas-settings-panel {
  border: 1px solid rgba(85, 104, 132, 0.64);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(18, 30, 48, 0.92) 0%, rgba(14, 24, 38, 0.96) 100%);
  padding: 12px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.saas-settings-panel h4 {
  margin: 0;
  color: #f8fafc;
  font-size: 0.95rem;
}

.saas-settings-meta {
  margin: 0;
  color: #c9d8ee;
  font-size: 0.8rem;
}

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

.saas-settings-actions .header-action-btn {
  min-height: 38px;
  font-size: 0.74rem;
  font-weight: 700;
}

.saas-settings-note {
  margin: 0;
  color: #9eb5d3;
  font-size: 0.74rem;
  line-height: 1.35;
}

.saas-settings-note.is-success {
  color: #86efac;
}

.saas-settings-note.is-warning {
  color: #fca5a5;
}

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

.saas-kpi-card {
  border: 1px solid rgba(81, 99, 126, 0.64);
  border-radius: 10px;
  background: rgba(14, 26, 44, 0.75);
  padding: 8px;
  display: grid;
  gap: 4px;
}

.saas-kpi-label {
  margin: 0;
  color: #98aecf;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.saas-kpi-value {
  margin: 0;
  color: #eff6ff;
  font-size: 0.9rem;
  font-weight: 700;
}

.saas-usage-meter {
  display: grid;
  gap: 6px;
}

.saas-usage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #dbe7f7;
  font-size: 0.74rem;
}

.saas-usage-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(75, 93, 120, 0.55);
  overflow: hidden;
}

.saas-usage-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.75) 0%, rgba(16, 185, 129, 0.95) 100%);
  transition: width 0.22s ease;
}

.saas-usage-fill.is-over {
  background: linear-gradient(90deg, rgba(248, 113, 113, 0.78) 0%, rgba(220, 38, 38, 0.95) 100%);
}

.saas-billing-detail-grid {
  display: grid;
  gap: 6px;
}

.saas-billing-detail-grid p {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #cddcf0;
  font-size: 0.74rem;
  border-bottom: 1px dashed rgba(78, 95, 121, 0.68);
  padding-bottom: 5px;
}

.saas-billing-detail-grid strong {
  color: #eff6ff;
  font-size: 0.75rem;
  font-weight: 700;
  text-align: right;
}

.saas-invoice-panel {
  grid-column: 1 / -1;
}

.saas-invoice-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.saas-invoice-head .header-action-btn {
  min-height: 32px;
  font-size: 0.72rem;
}

.saas-team-table-wrap {
  overflow: auto;
  border: 1px solid rgba(72, 88, 112, 0.64);
  border-radius: 10px;
}

.saas-team-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 420px;
}

.saas-team-table th,
.saas-team-table td {
  text-align: left;
  font-size: 0.75rem;
  color: #dbe7f7;
  border-bottom: 1px solid rgba(67, 82, 106, 0.62);
  padding: 7px 8px;
  vertical-align: top;
}

.saas-team-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: #17273d;
}

.saas-team-table td:last-child {
  display: flex;
  gap: 6px;
}

.saas-otp-log-table td:last-child {
  display: table-cell;
}

.saas-team-table select,
.saas-team-table input {
  min-height: 30px;
  border: 1px solid rgba(87, 106, 132, 0.68);
  border-radius: 8px;
  background: #102034;
  color: #e2e8f0;
  padding: 4px 6px;
  font-size: 0.75rem;
}

.saas-table-btn {
  min-height: 30px;
  border: 1px solid rgba(90, 112, 138, 0.72);
  border-radius: 8px;
  background: #12253a;
  color: #e2e8f0;
  padding: 4px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.saas-table-btn.danger {
  border-color: rgba(248, 113, 113, 0.62);
  color: #fecaca;
  background: rgba(127, 29, 29, 0.4);
}

.saas-add-user-form {
  display: grid;
  gap: 8px;
}

.saas-audit-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: #d6e3f4;
  font-size: 0.76rem;
}

.saas-audit-list li {
  line-height: 1.35;
}

@media (max-width: 1060px) {
  .saas-settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .saas-settings-dialog {
    width: 100%;
    max-height: 94vh;
    padding: 12px;
  }

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

  .saas-settings-actions {
    flex-direction: column;
  }

  .saas-settings-actions .header-action-btn {
    width: 100%;
  }

  .saas-admin-kpis {
    grid-template-columns: 1fr;
  }

  .saas-invoice-head {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Main app theme: black */
:root {
  --bg: #050505;
  --bg-soft: #0a0a0a;
  --card: #101010;
  --card-soft: #141414;
  --text: #f5f5f5;
  --muted: #a1a1aa;
  --line: #2a2a2a;
  --line-soft: #343434;
  --brand: #22c55e;
  --brand-strong: #15803d;
  --emerald: #22c55e;
  --emerald-soft: rgba(34, 197, 94, 0.16);
  --trust: #3b82f6;
  --trust-soft: rgba(59, 130, 246, 0.14);
  --danger: #ef4444;
  --shadow: 0 18px 34px rgba(0, 0, 0, 0.55);
}

body {
  background:
    radial-gradient(circle at 10% 0%, rgba(34, 197, 94, 0.1) 0, transparent 26%),
    radial-gradient(circle at 88% 100%, rgba(59, 130, 246, 0.08) 0, transparent 24%),
    var(--bg);
  color: var(--text);
}

.exec-header {
  background: rgba(7, 7, 7, 0.94);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.45);
}

.exec-header-left p {
  color: var(--muted);
  border: 1px solid #313131;
  background: rgba(17, 17, 17, 0.9);
}

.exec-header-left strong {
  color: var(--text);
}

.screen-switcher,
.event-section,
.menu-section,
.cost-summary-card,
.extra-cost-card,
.ingredient-rate-card,
.labour-card,
.per-plate-card,
.bi-card,
.bottom-action-card,
.function-menu-card,
.final-selection {
  border-color: var(--line);
  background: linear-gradient(180deg, #151515 0%, #101010 100%);
  box-shadow: var(--shadow);
}

.event-manager,
.category-manager,
.final-function-block,
.menu-filters,
.screen-switcher {
  border-color: #303030;
  background: #121212;
}

.menu-subcategory-heading {
  border-color: #2f2f2f;
  border-left-color: rgba(34, 197, 94, 0.9);
  background: linear-gradient(90deg, rgba(19, 31, 25, 0.95) 0%, rgba(16, 16, 16, 0.95) 100%);
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.14);
}

.menu-subcategory-title,
.menu-card h2,
.final-function-title,
.final-dish-name,
.cost-breakdown-grid span,
.bi-grid span,
.event-tab-title,
.cost-summary-card h3,
.extra-cost-card summary,
.ingredient-rate-card summary,
.labour-card h3,
.per-plate-card h3,
.bi-card h3 {
  color: var(--text);
}

.menu-subcategory-count {
  border-color: #2f2f2f;
  color: #c7d2fe;
  background: #111111;
}

.menu-card,
.final-dish-item,
.function-guest-item,
.bi-optimization,
.event-tab {
  border-color: #2f2f2f;
  background: #121212;
}

.menu-card.is-selected,
.event-tab.is-active {
  border-color: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.22), 0 14px 24px rgba(0, 0, 0, 0.4);
  background: #122017;
}

.header-action-btn,
.event-add-btn,
.filter-btn,
.function-menu-tab,
.bottom-action-btn,
.menu-search-clear,
.screen-switch-btn,
.dish-check,
.dish-edit-btn,
.dish-delete-btn,
.category-manager-btn,
.portion-control,
.labour-summary-edit {
  border-color: #343434;
  background: #111111;
  color: #e5e7eb;
  box-shadow: none;
}

.dish-edit-btn {
  border-color: rgba(59, 130, 246, 0.6);
  background: rgba(59, 130, 246, 0.16);
  color: #bfdbfe;
}

.dish-delete-btn,
.subcategory-delete-btn,
.category-manager-btn.danger,
.final-remove-btn {
  border-color: rgba(239, 68, 68, 0.62);
  background: rgba(127, 29, 29, 0.35);
  color: #fecaca;
}

.field input,
.field select,
.menu-search-field input,
.category-manager input,
.category-manager select,
.function-guest-item input,
.ingredient-rate-table input,
.labour-input {
  border-color: #353535;
  background: #0f0f0f;
  color: var(--text);
}

.field input::placeholder,
.menu-search-field input::placeholder,
.category-manager input::placeholder {
  color: #7b8088;
}

.field input:focus,
.field select:focus,
.menu-search-field input:focus,
.category-manager input:focus,
.category-manager select:focus,
.function-guest-item input:focus,
.ingredient-rate-table input:focus,
.labour-input:focus {
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.22);
}

.menu-subtitle,
.menu-selection-summary,
.menu-meta,
.function-menu-note,
.field-helper,
.per-plate-note,
.bi-note,
.cost-big-label,
.ingredient-list,
.final-selection-empty,
.event-tab-meta,
.function-guest-note,
.cost-breakdown-grid p,
.bi-grid p,
.mobile-sheet-body {
  color: var(--muted);
}

.cost-breakdown-grid p,
.bi-grid p {
  border-bottom-color: #2f2f2f;
}

.ingredient-rate-table-wrap,
.labour-table,
.ingredient-rate-table th,
.labour-table th,
.ingredient-rate-table td,
.labour-table td {
  border-color: #2f2f2f;
}

.ingredient-rate-table th,
.labour-table th {
  background: #161616;
  color: #d1d5db;
}

.ingredient-rate-table tbody tr:nth-child(odd) td,
.labour-table tbody tr:nth-child(odd) td {
  background: #101010;
}

.mobile-cost-sheet {
  border: 1px solid #2f2f2f;
  background: rgba(8, 8, 8, 0.96);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.42);
}

.mobile-sheet-toggle {
  background: #101010;
  color: var(--text);
  border: 1px solid #2f2f2f;
}

.mobile-sheet-body {
  border-top-color: #2f2f2f;
}

@media (max-width: 760px) {
  body {
    background:
      radial-gradient(circle at 14% 0%, rgba(34, 197, 94, 0.09) 0, transparent 24%),
      radial-gradient(circle at 88% 100%, rgba(59, 130, 246, 0.08) 0, transparent 22%),
      #050505;
  }

  .exec-header-left p {
    border: 1px solid #2f2f2f;
    background: #111111;
  }
}

.cost-impact-tag {
  position: fixed;
  right: 20px;
  bottom: 84px;
  z-index: 45;
  border: 1px solid rgba(16, 185, 129, 0.5);
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.2);
  color: #d1fae5;
  padding: 8px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}

.cost-impact-tag.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.cost-impact-tag.is-negative {
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.2);
}

.app-toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%) translateY(12px);
  z-index: 60;
  border: 1px solid #3d4f69;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.97);
  color: #e2e8f0;
  padding: 9px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
}

.app-toast.is-success {
  border-color: rgba(16, 185, 129, 0.56);
  color: #d1fae5;
}

.app-toast.is-warning {
  border-color: rgba(251, 191, 36, 0.56);
  color: #fef3c7;
}

.app-toast.is-danger {
  border-color: rgba(248, 113, 113, 0.58);
  color: #fee2e2;
}

.app-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

button,
input,
select,
summary {
  font-family: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(16, 185, 129, 0.55);
  outline-offset: 1px;
}

/* UI polish pass */
html {
  scroll-behavior: smooth;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 50% 20%, #000 35%, transparent 88%);
  z-index: -1;
}

.exec-header {
  border-bottom: 1px solid rgba(71, 85, 105, 0.75);
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.38);
}

.exec-header-left p {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(71, 85, 105, 0.45);
  background: rgba(30, 41, 59, 0.6);
}

.exec-header-left strong {
  color: #f8fafc;
}

.header-action-btn {
  min-height: 38px;
  border-color: rgba(71, 85, 105, 0.72);
}

.header-action-btn[data-header-action="save-draft"] {
  border-color: rgba(16, 185, 129, 0.38);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.18) 0%, #1a2f3f 100%);
}

.page {
  margin-top: 22px;
}

.workspace-left,
.workspace-right {
  gap: 16px;
}

.event-section,
.menu-section,
.cost-summary-card,
.extra-cost-card,
.ingredient-rate-card,
.labour-card,
.per-plate-card,
.bi-card,
.bottom-action-card,
.function-menu-card,
.final-selection {
  border-color: rgba(71, 85, 105, 0.65);
  background:
    linear-gradient(180deg, rgba(37, 53, 75, 0.9) 0%, rgba(23, 34, 52, 0.95) 100%),
    radial-gradient(circle at 100% -10%, rgba(16, 185, 129, 0.08), transparent 38%);
}

.event-header h2,
.menu-header h1 {
  letter-spacing: 0.01em;
}

.event-manager {
  background: linear-gradient(180deg, #22324a 0%, #1b2a41 100%);
  border-color: rgba(82, 101, 127, 0.6);
}

.event-tab {
  border-color: rgba(82, 101, 127, 0.65);
  background: linear-gradient(180deg, #1c2940 0%, #162236 100%);
}

.event-tab.is-active {
  background: linear-gradient(180deg, #133047 0%, #10283e 100%);
}

.field span {
  color: #b7c4d8;
}

.field input,
.field select {
  min-height: 42px;
  border-color: rgba(75, 93, 120, 0.76);
  background: linear-gradient(180deg, #121f33 0%, #0e1a2c 100%);
}

.event-function-option {
  border-color: rgba(79, 100, 128, 0.74);
  background: linear-gradient(180deg, #1a2a41 0%, #152337 100%);
}

.function-guest-section {
  border-color: rgba(79, 100, 128, 0.72);
  background: linear-gradient(180deg, #13233a 0%, #111f34 100%);
}

.menu-filters {
  padding: 10px 0;
  border-top: 1px solid rgba(51, 65, 85, 0.45);
}

.filter-btn,
.function-menu-tab {
  border-color: rgba(83, 102, 131, 0.8);
  background: linear-gradient(180deg, #1d2c44 0%, #14243a 100%);
  color: #d7e2ef;
}

.filter-btn:hover,
.function-menu-tab:hover {
  border-color: rgba(16, 185, 129, 0.66);
  color: #effdf6;
  transform: translateY(-1px);
}

.menu-grid {
  gap: 12px;
}

.menu-subcategory-heading {
  border-color: rgba(92, 117, 144, 0.72);
  background:
    linear-gradient(90deg, rgba(24, 48, 73, 0.98) 0%, rgba(27, 58, 86, 0.98) 100%);
}

.menu-card {
  border-color: rgba(79, 102, 130, 0.7);
  background:
    linear-gradient(180deg, rgba(24, 37, 57, 0.96) 0%, rgba(19, 30, 47, 0.98) 100%);
  box-shadow: 0 10px 22px rgba(2, 6, 23, 0.25);
}

.menu-card:hover {
  box-shadow: 0 16px 28px rgba(2, 6, 23, 0.42);
}

.menu-card h2 {
  font-size: 1.03rem;
}

.menu-card > span {
  border-color: rgba(251, 191, 36, 0.48);
  color: #fff7d6;
}

.dish-check {
  border-color: rgba(78, 100, 129, 0.74);
  background: linear-gradient(180deg, #14233a 0%, #101d31 100%);
}

.ingredient-details {
  border-color: rgba(80, 101, 129, 0.56);
}

.portion-control {
  border-color: rgba(78, 100, 129, 0.72);
}

.portion-btn {
  border-color: rgba(86, 109, 139, 0.84);
}

.final-function-block {
  border-color: rgba(78, 102, 132, 0.76);
  background: linear-gradient(180deg, #1c2b43 0%, #17253b 100%);
}

.final-dish-item {
  border-color: rgba(73, 95, 123, 0.74);
  background: linear-gradient(180deg, #13223a 0%, #0f1d31 100%);
}

.cost-summary-card h3,
.extra-cost-card summary,
.ingredient-rate-card h3,
.labour-card h3,
.per-plate-card h3,
.bi-card h3,
.final-selection h3,
.function-menu-card h3 {
  letter-spacing: 0.02em;
}

.cost-summary-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sidebar-scroll-toggle {
  border: 1px solid rgba(83, 102, 131, 0.84);
  border-radius: 999px;
  background: linear-gradient(180deg, #1c2d46 0%, #16253c 100%);
  color: #d7e2ef;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 5px 10px;
  cursor: pointer;
  transition: 0.16s ease;
}

.sidebar-scroll-toggle:hover {
  border-color: var(--emerald);
  color: #f0fdf4;
}

/* Clean UI refinements */
body {
  background: linear-gradient(180deg, #0f172a 0%, #111b2f 100%);
}

body::before {
  display: none;
}

.exec-header-left p {
  padding: 0;
  border: 0;
  background: transparent;
}

.header-action-btn {
  box-shadow: none;
}

.event-section,
.menu-section,
.cost-summary-card,
.extra-cost-card,
.ingredient-rate-card,
.labour-card,
.per-plate-card,
.bi-card,
.bottom-action-card,
.function-menu-card,
.final-selection {
  border-color: rgba(71, 85, 105, 0.55);
  box-shadow: 0 8px 18px rgba(2, 6, 23, 0.2);
}

.menu-card,
.event-tab,
.function-menu-card,
.final-function-block,
.final-dish-item {
  box-shadow: none;
}

.menu-card h2 {
  font-size: 0.98rem;
}

.menu-meta {
  color: #a8b7ca;
  font-size: 0.8rem;
}

.cost-breakdown-grid p,
.bi-grid p {
  border-bottom-style: solid;
  border-bottom-width: 1px;
}

.warning-item {
  font-size: 0.78rem;
}

.cost-big-number {
  font-size: clamp(2.1rem, 3.8vw, 2.8rem);
  text-shadow: 0 0 24px rgba(16, 185, 129, 0.15);
}

.cost-summary-stats {
  margin-top: 2px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.cost-stat {
  border: 1px solid rgba(78, 100, 130, 0.74);
  border-radius: 10px;
  background: linear-gradient(180deg, #18273d 0%, #132237 100%);
  padding: 7px 8px;
  display: grid;
  gap: 4px;
}

.cost-stat-label {
  color: #a8bad2;
  font-size: 0.67rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.cost-stat strong {
  color: #f8fafc;
  font-size: 0.95rem;
  font-weight: 800;
}

.cost-summary-head {
  margin-top: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 12px;
  align-items: start;
}

.cost-summary-main {
  min-width: 0;
}

.cost-summary-side {
  display: grid;
  gap: 8px;
}

.cost-active-function {
  margin: 7px 0 0;
  color: #cce6d8;
  font-size: 0.8rem;
  font-weight: 600;
}

.cost-breakdown-grid p,
.bi-grid p {
  border-bottom-color: rgba(80, 101, 130, 0.58);
}

.extra-cost-grid {
  gap: 12px;
}

.ingredient-rate-table-wrap,
.labour-table {
  border-color: rgba(77, 97, 124, 0.72);
}

.bottom-action-card {
  border-color: rgba(70, 92, 120, 0.8);
  background: linear-gradient(180deg, #1f3049 0%, #16263d 100%);
}

.bottom-action-btn {
  min-height: 42px;
  border-color: rgba(82, 103, 130, 0.8);
  background: linear-gradient(180deg, #1d2c44 0%, #152437 100%);
}

.mobile-cost-sheet {
  border-color: rgba(68, 101, 145, 0.76);
}

/* Costing UI upgrade */
.cost-summary-card {
  position: sticky;
  top: 86px;
  z-index: 6;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.cost-summary-card.is-ready {
  border-color: rgba(16, 185, 129, 0.65);
  box-shadow:
    0 0 0 1px rgba(16, 185, 129, 0.2),
    0 14px 26px rgba(2, 6, 23, 0.36);
}

.cost-summary-card.is-warning {
  border-color: rgba(239, 68, 68, 0.58);
  box-shadow:
    0 0 0 1px rgba(239, 68, 68, 0.16),
    0 14px 26px rgba(2, 6, 23, 0.36);
}

.cost-summary-card.is-pending {
  border-color: rgba(251, 191, 36, 0.58);
  box-shadow:
    0 0 0 1px rgba(251, 191, 36, 0.15),
    0 14px 26px rgba(2, 6, 23, 0.36);
}

.cost-summary-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.cost-health-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(251, 191, 36, 0.55);
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.18);
  color: #fef3c7;
  padding: 4px 10px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.cost-health-pill.is-ready {
  border-color: rgba(16, 185, 129, 0.55);
  background: rgba(16, 185, 129, 0.2);
  color: #dcfce7;
}

.cost-health-pill.is-warning {
  border-color: rgba(239, 68, 68, 0.55);
  background: rgba(239, 68, 68, 0.18);
  color: #fecaca;
}

.cost-health-pill.is-pending {
  border-color: rgba(251, 191, 36, 0.55);
  background: rgba(251, 191, 36, 0.18);
  color: #fef3c7;
}

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

.cost-breakdown-grid p,
.cost-breakdown-item {
  margin: 0;
  border: 1px solid rgba(80, 101, 130, 0.5);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(25, 38, 57, 0.94) 0%, rgba(19, 30, 46, 0.96) 100%);
  padding: 8px 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: #cbd7e7;
}

.cost-breakdown-grid span,
.cost-breakdown-item span {
  justify-self: end;
  color: #f8fafc;
  font-weight: 800;
  font-size: 0.8rem;
}

.cost-breakdown-item.is-strong {
  border-color: rgba(16, 185, 129, 0.62);
  background: linear-gradient(180deg, rgba(22, 56, 56, 0.95) 0%, rgba(17, 43, 48, 0.96) 100%);
}

.cost-breakdown-item.is-total {
  border-color: rgba(56, 189, 248, 0.62);
  background: linear-gradient(180deg, rgba(19, 48, 67, 0.95) 0%, rgba(16, 37, 54, 0.96) 100%);
}

.warning-box-side {
  max-height: 132px;
  overflow: auto;
  padding-right: 2px;
}

.warning-item {
  border-radius: 10px;
  padding: 7px 9px;
  line-height: 1.3;
}

.warning-item.is-ok {
  border-color: rgba(16, 185, 129, 0.5);
  background: rgba(16, 185, 129, 0.16);
  color: #dcfce7;
}

.extra-cost-card summary,
.ingredient-rate-card summary,
.labour-summary {
  position: relative;
  padding-right: 22px;
}

.extra-cost-card summary::after,
.ingredient-rate-card summary::after,
.labour-summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 0;
  color: #c7d7eb;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
}

.extra-cost-card[open] summary::after,
.ingredient-rate-card[open] summary::after,
.labour-card[open] .labour-summary::after {
  content: "-";
}

.extra-cost-grid .field {
  border: 1px solid rgba(77, 99, 126, 0.58);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(20, 32, 49, 0.9) 0%, rgba(16, 25, 40, 0.92) 100%);
  padding: 8px;
}

.extra-cost-grid .field span {
  color: #b8c8dc;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
}

.extra-cost-grid .field input {
  min-height: 40px;
}

#extra-labour-cost[readonly] {
  color: #d1fae5;
  border-color: rgba(16, 185, 129, 0.45);
}

.labour-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.labour-line-total {
  color: #ecfdf5;
  font-weight: 700;
}

.per-plate-line {
  margin: 8px 0 0;
  border: 1px solid rgba(75, 96, 123, 0.52);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(22, 34, 51, 0.9) 0%, rgba(17, 27, 43, 0.92) 100%);
  padding: 7px 9px;
}

.per-plate-line.is-strong {
  border-color: rgba(16, 185, 129, 0.62);
  background: linear-gradient(180deg, rgba(22, 56, 56, 0.94) 0%, rgba(16, 41, 45, 0.96) 100%);
}

.bi-grid {
  gap: 10px;
}

body.screen-view-right .workspace-right {
  align-content: start;
}

@media (max-width: 1100px) {
  .exec-header {
    gap: 10px;
  }

  .exec-header-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .screen-switch-btn {
    min-height: 48px;
    font-size: 0.86rem;
  }

  .exec-header {
    position: static;
    padding: 10px 12px;
  }

  .exec-header-left,
  .exec-header-actions {
    width: 100%;
  }

  .form-grid,
  .extra-cost-grid,
  .bottom-action-card {
    grid-template-columns: 1fr;
  }

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

  .cost-summary-tools {
    width: 100%;
    justify-content: space-between;
  }

  .cost-breakdown-grid {
    grid-template-columns: 1fr;
  }

  .cost-summary-head {
    grid-template-columns: 1fr;
  }

  .cost-summary-side {
    gap: 10px;
  }

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

  .menu-subcategory-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .menu-subcategory-actions {
    width: 100%;
    justify-content: space-between;
  }

  .category-manager-row,
  .category-manager-row:first-of-type {
    grid-template-columns: 1fr;
  }

  .menu-filters {
    position: static;
    background: transparent;
    padding: 0;
    border-top: 0;
  }

  .menu-card {
    grid-template-columns: 1fr;
  }

  .mobile-cost-sheet {
    display: block;
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 35;
    border: 1px solid #335076;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.96);
    backdrop-filter: blur(8px);
    padding: 10px 12px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
  }

  .mobile-sheet-toggle {
    min-height: 48px;
    font-size: 0.9rem;
    font-weight: 700;
  }

  #mobile-sheet-price {
    font-size: 1rem;
  }

  .mobile-quick-field input,
  .mobile-quick-btn {
    min-height: 46px;
  }

  .dish-editor-dialog {
    width: 100%;
    max-height: 92vh;
    padding: 12px;
  }

  .dish-editor-grid {
    grid-template-columns: 1fr;
  }

  .dish-editor-actions {
    justify-content: stretch;
  }

  .dish-editor-actions .header-action-btn {
    flex: 1;
    min-height: 44px;
  }

  .cost-summary-card {
    position: static;
  }

  .cost-impact-tag {
    right: 12px;
    left: 12px;
    text-align: center;
    bottom: 78px;
  }

  .app-toast {
    left: 10px;
    right: 10px;
    bottom: 88px;
    transform: translateY(12px);
    text-align: center;
    border-radius: 12px;
  }

  .app-toast.is-visible {
    transform: translateY(0);
  }

  .page {
    margin-bottom: 140px;
  }
}

/* UI improvement pass: menu clarity + faster scanning */
.menu-header {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(71, 85, 105, 0.68);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(28, 44, 66, 0.88) 0%, rgba(19, 31, 47, 0.94) 100%),
    radial-gradient(circle at 100% -20%, rgba(16, 185, 129, 0.1), transparent 42%);
}

.menu-subtitle {
  max-width: 68ch;
}

.menu-selection-summary {
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(71, 85, 105, 0.62);
  background: rgba(15, 23, 42, 0.42);
}

.menu-search-field {
  max-width: 620px;
  margin-top: 6px;
}

.menu-search-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.menu-search-control input {
  flex: 1;
}

.menu-search-clear {
  min-height: 40px;
  border: 1px solid rgba(96, 115, 140, 0.72);
  border-radius: 10px;
  background: linear-gradient(180deg, #192a42 0%, #132237 100%);
  color: #dbe8f8;
  padding: 0 12px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: 0.16s ease;
}

.menu-search-clear:hover {
  border-color: rgba(16, 185, 129, 0.62);
  color: #ecfdf5;
}

.menu-search-clear:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.menu-filters {
  padding: 10px 8px 12px;
  border: 1px solid rgba(71, 85, 105, 0.58);
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.07);
}

.filter-btn {
  min-height: 36px;
  padding: 8px 13px;
}

.filter-btn.is-active {
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.4), 0 7px 14px rgba(2, 6, 23, 0.24);
}

.menu-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.menu-subcategory-heading {
  position: sticky;
  top: 128px;
  z-index: 6;
  border: 1px solid rgba(56, 189, 248, 0.56);
  border-left: 4px solid rgba(16, 185, 129, 0.9);
  background: linear-gradient(
    90deg,
    rgba(18, 45, 70, 0.98) 0%,
    rgba(24, 58, 88, 0.98) 100%
  );
  box-shadow:
    0 8px 18px rgba(2, 6, 23, 0.28),
    inset 0 0 0 1px rgba(16, 185, 129, 0.12);
}

.menu-subcategory-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.03em;
}

.menu-subcategory-count {
  font-weight: 800;
  border-color: rgba(125, 211, 252, 0.6);
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.62);
}

.menu-card {
  border-color: rgba(94, 120, 150, 0.74);
}

.menu-card-top {
  align-items: flex-start;
}

.menu-card-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dish-edit-btn,
.dish-delete-btn,
.dish-check {
  min-height: 30px;
}

.menu-meta {
  line-height: 1.35;
}

.menu-card > span {
  align-self: start;
}

@media (max-width: 760px) {
  .menu-header {
    padding: 10px;
  }

  .menu-search-control {
    flex-direction: column;
    align-items: stretch;
  }

  .menu-search-clear {
    width: 100%;
    min-height: 42px;
  }

  .menu-grid {
    gap: 10px;
  }

  .menu-subcategory-heading {
    position: static;
  }

  .menu-card-actions {
    justify-content: flex-start;
  }

}

/* SaaS palette harmonization: align in-app workspace with landing/pricing psychology colors */
:root {
  --bg: #f9fafb;
  --bg-soft: #f3f7fc;
  --card: #ffffff;
  --card-soft: #f8fbff;
  --text: #111827;
  --muted: #64748b;
  --line: #d7dee6;
  --line-soft: #c4cfdd;
  --brand: #14532d;
  --brand-strong: #0f5132;
  --cta: #22c55e;
  --cta-strong: #16a34a;
  --emerald: #22c55e;
  --emerald-soft: rgba(34, 197, 94, 0.14);
  --trust: #2563eb;
  --trust-soft: rgba(37, 99, 235, 0.12);
  --gold: #b45309;
  --danger: #dc2626;
  --shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

body {
  font-family: "Manrope", "Inter", sans-serif;
  background:
    radial-gradient(circle at 10% 0%, rgba(34, 197, 94, 0.11) 0, transparent 25%),
    radial-gradient(circle at 88% 100%, rgba(37, 99, 235, 0.1) 0, transparent 22%),
    var(--bg);
  color: var(--text);
}

.event-header h2,
.menu-header h1,
.function-menu-card h3,
.final-selection h3,
.cost-summary-card h3,
.extra-cost-card summary,
.labour-card h3,
.per-plate-card h3,
.bi-card h3,
.ingredient-rate-card summary {
  color: #0f172a;
  font-family: "Sora", "Manrope", sans-serif;
}

.auth-gate {
  background:
    radial-gradient(circle at 20% 10%, rgba(34, 197, 94, 0.22), transparent 30%),
    radial-gradient(circle at 80% 90%, rgba(37, 99, 235, 0.2), transparent 28%),
    rgba(15, 23, 42, 0.56);
}

.auth-gate-card {
  border: 1px solid #d0dbe8;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.18);
}

.auth-eyebrow {
  color: var(--brand);
}

.auth-gate-card h1 {
  color: #0f172a;
  font-family: "Sora", "Manrope", sans-serif;
}

.auth-subtitle,
.auth-note {
  color: var(--muted);
}

.auth-register {
  border: 1px solid #d4deea;
  background: #f8fbff;
}

.auth-register summary,
.auth-field span {
  color: #1f2937;
}

.auth-field input,
.auth-field select {
  border: 1px solid #c8d3e1;
  background: #ffffff;
  color: #111827;
}

.auth-field input:focus,
.auth-field select:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

.auth-error {
  color: #b91c1c;
}

.auth-submit-btn {
  border: 1px solid var(--cta-strong, #16a34a);
  background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(22, 163, 74, 0.24);
}

.auth-submit-btn:hover {
  border-color: #15803d;
}

.auth-step-indicator {
  border-color: rgba(37, 99, 235, 0.3);
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
}

.auth-login-fallback {
  border-color: #d4deea;
  background: #f8fbff;
}

.auth-login-fallback summary {
  color: #1f2937;
}

.auth-link-btn {
  border-color: #c8d3e1;
  background: #ffffff;
  color: #1e3a8a;
}

.auth-link-btn:hover {
  border-color: #2563eb;
  color: #1d4ed8;
}

.auth-inline-note,
.auth-microcopy {
  color: #64748b;
}

.auth-side-panel {
  border-color: #d4deea;
  background: linear-gradient(180deg, #f8fbff 0%, #f3f8ff 100%);
}

.auth-side-panel img {
  border-color: #d4deea;
}

.auth-side-title {
  color: #0f172a;
}

.auth-benefit-list {
  color: #1f2937;
}

.auth-roi-line {
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.12);
  color: #14532d;
}

.exec-header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.exec-header-left p {
  color: #4b5563;
}

.exec-header-left strong {
  color: #111827;
}

.status-draft {
  color: #92400e;
  background: #fef3c7;
  border-color: #f3ce7b;
}

.status-ready {
  color: #14532d;
  background: #dcfce7;
  border-color: #86efac;
}

.status-missing {
  color: #991b1b;
  background: #fee2e2;
  border-color: #fca5a5;
}

.header-action-btn {
  border: 1px solid #c8d3e1;
  background: #ffffff;
  color: #1f2937;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.header-action-btn[data-bottom-action="quotation"] {
  border-color: rgba(34, 197, 94, 0.56);
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.16) 0%, #ffffff 100%);
  color: #14532d;
}

.header-action-btn[data-bottom-action="quotation-share"] {
  border-color: rgba(37, 99, 235, 0.52);
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.12) 0%, #ffffff 100%);
  color: #1d4ed8;
}

.header-action-btn[data-bottom-action="grocery"] {
  border-color: rgba(180, 83, 9, 0.46);
  background: linear-gradient(180deg, rgba(180, 83, 9, 0.12) 0%, #ffffff 100%);
  color: #92400e;
}

.header-action-btn[data-header-action="import-backup"] {
  border-color: rgba(37, 99, 235, 0.44);
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.1) 0%, #ffffff 100%);
  color: #1e40af;
}

.header-action-btn[data-header-action="export-backup"] {
  border-color: #c7d3e1;
  background: #f8fafc;
  color: #334155;
}

.header-action-btn[data-header-action="reset-booking"] {
  border-color: rgba(220, 38, 38, 0.46);
  background: linear-gradient(180deg, rgba(220, 38, 38, 0.1) 0%, #ffffff 100%);
  color: #b91c1c;
}

.header-action-btn:hover {
  border-color: #16a34a;
  box-shadow: 0 8px 18px rgba(22, 163, 74, 0.16);
}

.screen-switcher,
.event-section,
.menu-section,
.cost-summary-card,
.extra-cost-card,
.ingredient-rate-card,
.labour-card,
.per-plate-card,
.bi-card,
.bottom-action-card,
.function-menu-card,
.final-selection {
  border-color: var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: var(--shadow);
}

.event-manager,
.category-manager,
.final-function-block,
.menu-filters {
  border-color: #d3ddeb;
  background: #f8fbff;
}

.screen-switcher {
  border-color: #d1dbe8;
  background: #eff6ff;
}

.screen-switch-btn {
  border-color: #c7d3e2;
  background: #ffffff;
  color: #1f2937;
}

.screen-switch-btn.is-active {
  border-color: var(--trust);
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.eyebrow {
  color: var(--brand);
}

.menu-subtitle,
.menu-selection-summary,
.menu-meta,
.function-menu-note,
.field-helper,
.per-plate-note,
.bi-note,
.cost-big-label,
.ingredient-list,
.final-selection-empty,
.event-tab-meta,
.function-guest-note {
  color: var(--muted);
}

.menu-selection-summary {
  border-color: #c7d4e5;
  background: #f8fafc;
}

.menu-filters {
  background: #f8fbff;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.08);
}

.filter-btn,
.function-menu-tab {
  border-color: #c7d3e2;
  background: #ffffff;
  color: #1f2937;
}

.filter-btn.is-active,
.function-menu-tab.is-active {
  border-color: #16a34a;
  background: rgba(34, 197, 94, 0.14);
  color: #14532d;
  box-shadow: 0 6px 14px rgba(22, 163, 74, 0.14);
}

.event-add-btn {
  border-color: #c8d3e1;
  background: #ffffff;
  color: #1f2937;
}

.event-add-btn[data-event-action="duplicate"] {
  border-color: rgba(37, 99, 235, 0.44);
  background: rgba(37, 99, 235, 0.1);
  color: #1e40af;
}

.event-add-btn[data-event-action="delete"] {
  border-color: rgba(220, 38, 38, 0.44);
  background: rgba(220, 38, 38, 0.1);
  color: #b91c1c;
}

.event-tab {
  border-color: #c9d5e3;
  background: #ffffff;
}

.event-tab.is-active {
  border-color: #16a34a;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
  background: #f0fdf4;
}

.event-tab-title {
  color: #0f172a;
}

.menu-subcategory-heading {
  border-color: rgba(37, 99, 235, 0.42);
  border-left-color: rgba(22, 163, 74, 0.86);
  background: linear-gradient(90deg, #eff6ff 0%, #ecfdf5 100%);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.08);
}

.menu-subcategory-title {
  color: #0f172a;
}

.menu-subcategory-count {
  border-color: #bfdbfe;
  color: #1e3a8a;
  background: #ffffff;
}

.menu-card,
.final-dish-item,
.function-guest-item,
.bi-optimization {
  border-color: #d1dbe9;
  background: #ffffff;
}

.menu-card.is-selected {
  border-color: #16a34a;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2), 0 12px 20px rgba(15, 23, 42, 0.08);
}

.menu-card h2,
.final-function-title,
.final-dish-name,
.cost-breakdown-grid span,
.bi-grid span {
  color: #0f172a;
}

.menu-card > span {
  color: #92400e;
  border-color: #f5d69f;
  background: #fff7ed;
}

.dish-check {
  border-color: #cad7e7;
  background: #ffffff;
  color: #334155;
}

.dish-edit-btn {
  border-color: rgba(37, 99, 235, 0.5);
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.dish-delete-btn,
.subcategory-delete-btn {
  border-color: rgba(220, 38, 38, 0.46);
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
}

.category-manager-btn {
  border-color: rgba(34, 197, 94, 0.5);
  background: rgba(34, 197, 94, 0.14);
  color: #14532d;
}

.category-manager-btn.danger,
.final-remove-btn {
  border-color: rgba(220, 38, 38, 0.44);
  background: rgba(220, 38, 38, 0.11);
  color: #b91c1c;
}

.field input,
.field select,
.menu-search-field input,
.category-manager input,
.category-manager select,
.function-guest-item input,
.ingredient-rate-table input,
.labour-input,
.auth-field input {
  border-color: #c9d4e2;
  background: #ffffff;
  color: #111827;
}

.field input::placeholder,
.menu-search-field input::placeholder,
.category-manager input::placeholder,
.auth-field input::placeholder {
  color: #6b7280;
}

.field input:focus,
.field select:focus,
.menu-search-field input:focus,
.category-manager input:focus,
.category-manager select:focus,
.function-guest-item input:focus,
.ingredient-rate-table input:focus,
.labour-input:focus {
  outline: none;
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

.field-guest.is-required-missing input {
  border-color: rgba(220, 38, 38, 0.7);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.field-guest.is-required-missing .field-helper {
  color: #b91c1c;
}

.event-function-option,
.portion-control,
.labour-summary-edit,
.bottom-action-btn,
.menu-search-clear {
  border-color: #c7d3e2;
  background: #ffffff;
  color: #334155;
}

.event-function-option:has(input:checked) {
  border-color: #16a34a;
  background: rgba(34, 197, 94, 0.12);
}

.bottom-action-btn:hover,
.menu-search-clear:hover {
  border-color: #16a34a;
}

.bottom-action-btn[data-bottom-action="quotation"] {
  border-color: rgba(34, 197, 94, 0.56);
  background: rgba(34, 197, 94, 0.14);
  color: #14532d;
}

.bottom-action-btn[data-bottom-action="quotation-share"] {
  border-color: rgba(37, 99, 235, 0.52);
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.cost-big-number,
.extra-cost-total,
.labour-grand-total,
.per-plate-line.is-strong,
.final-function-total {
  color: #14532d;
}

.cost-big-note {
  color: #92400e;
}

.cost-change-note {
  color: #166534;
}

.cost-breakdown-grid p,
.bi-grid p {
  color: #475569;
  border-bottom-color: #d8e1ed;
}

.warning-item {
  border-color: rgba(220, 38, 38, 0.38);
  background: rgba(220, 38, 38, 0.1);
  color: #991b1b;
}

.ingredient-rate-table-wrap,
.labour-table,
.ingredient-rate-table th,
.labour-table th,
.ingredient-rate-table td,
.labour-table td {
  border-color: #d5deea;
}

.ingredient-rate-table th,
.labour-table th {
  background: #f3f7fc;
  color: #334155;
}

.ingredient-rate-table tbody tr:nth-child(odd) td,
.labour-table tbody tr:nth-child(odd) td {
  background: #f8fbff;
}

.mobile-sheet-toggle {
  background: #f8fbff;
  color: #1f2937;
  border: 1px solid #d3dceb;
}

.mobile-sheet-body {
  border-top-color: #d4deea;
  color: #475569;
}

/* Mobile visual polish: spacing + contrast only */
@media (max-width: 760px) {
  body {
    background:
      radial-gradient(circle at 14% 0%, rgba(34, 197, 94, 0.09) 0, transparent 24%),
      radial-gradient(circle at 88% 100%, rgba(37, 99, 235, 0.08) 0, transparent 22%),
      #f9fafb;
  }

  .page {
    width: 94vw;
    margin-top: 12px;
    margin-bottom: 146px;
  }

  .exec-header {
    padding: 10px 10px 8px;
    gap: 8px;
  }

  .exec-header-left {
    gap: 6px;
  }

  .exec-header-left p {
    margin: 0;
    font-size: 0.74rem;
    border: 1px solid #d7dee8;
    border-radius: 999px;
    background: #ffffff;
    padding: 3px 8px;
  }

  .exec-header-actions {
    gap: 6px;
  }

  .header-action-btn {
    min-height: 40px;
    padding: 0 11px;
    font-size: 0.76rem;
    border-radius: 10px;
  }

  .screen-switcher {
    padding: 6px;
    gap: 6px;
    margin-bottom: 8px;
  }

  .screen-switch-btn {
    min-height: 44px;
    font-size: 0.82rem;
    border-radius: 10px;
  }

  .workspace-left,
  .workspace-right {
    gap: 12px;
  }

  .event-section,
  .menu-section,
  .cost-summary-card,
  .extra-cost-card,
  .ingredient-rate-card,
  .labour-card,
  .per-plate-card,
  .bi-card,
  .bottom-action-card,
  .function-menu-card,
  .final-selection {
    border-radius: 12px;
    padding: 10px;
  }

  .event-manager-head {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .event-manager-actions {
    justify-content: flex-start;
    gap: 6px;
  }

  .event-add-btn {
    min-height: 34px;
    font-size: 0.75rem;
    padding: 6px 10px;
  }

  .event-tabs {
    gap: 6px;
  }

  .event-tab {
    min-width: 150px;
    padding: 8px 9px;
  }

  .event-tab-title {
    font-size: 0.78rem;
  }

  .event-tab-meta {
    font-size: 0.71rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .field span {
    font-size: 0.71rem;
  }

  .field input,
  .field select,
  .menu-search-field input,
  .category-manager input,
  .category-manager select {
    min-height: 44px;
    font-size: 0.89rem;
  }

  .menu-search-field {
    margin-top: 4px;
  }

  .menu-search-control {
    gap: 6px;
  }

  .menu-search-clear {
    min-height: 42px;
    font-size: 0.78rem;
  }

  .menu-filters {
    gap: 6px;
    padding: 2px 0 0;
    margin-top: 8px;
  }

  .filter-btn,
  .function-menu-tab {
    min-height: 40px;
    font-size: 0.77rem;
    padding: 7px 11px;
  }

  .menu-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .menu-subcategory-heading {
    padding: 8px 10px;
    gap: 8px;
    border-left-width: 3px;
  }

  .menu-subcategory-title {
    font-size: 0.84rem;
  }

  .menu-subcategory-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
  }

  .menu-card {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
  }

  .menu-card-top {
    gap: 8px;
  }

  .menu-card h2 {
    font-size: 0.93rem;
  }

  .menu-meta {
    font-size: 0.77rem;
    line-height: 1.3;
  }

  .menu-card-actions {
    justify-content: flex-start;
    gap: 6px;
  }

  .dish-edit-btn,
  .dish-delete-btn,
  .dish-check {
    min-height: 32px;
    font-size: 0.71rem;
    padding: 4px 9px;
  }

  .bottom-action-card {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .bottom-action-btn {
    min-height: 44px;
    font-size: 0.82rem;
  }

  .mobile-cost-sheet {
    left: 8px;
    right: 8px;
    bottom: 8px;
    border: 1px solid #d4deea;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.16);
    padding: 9px 10px;
  }

  .mobile-sheet-toggle {
    min-height: 46px;
    font-size: 0.86rem;
    font-weight: 700;
    background: #ffffff;
  }

  .mobile-sheet-body {
    max-height: min(52vh, 400px);
    font-size: 0.8rem;
  }

  .mobile-quick-edit {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .mobile-quick-field {
    padding: 7px;
  }

  .mobile-quick-field span {
    font-size: 0.62rem;
  }

  .mobile-quick-field input {
    min-height: 44px;
  }

  .mobile-quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .mobile-quick-btn {
    min-height: 44px;
    font-size: 0.74rem;
  }

  .app-toast {
    left: 8px;
    right: 8px;
    bottom: 84px;
    border-radius: 10px;
    font-size: 0.78rem;
    padding: 9px 10px;
  }
}

/* Premium Dark UI Final Override (effective) */
:root {
  --bg: #050608;
  --bg-soft: #0b0e14;
  --card: #10141d;
  --card-soft: #141a24;
  --text: #f3f6fb;
  --muted: #9aa6b7;
  --line: #263041;
  --line-soft: #2f3b4e;
  --brand: #22c55e;
  --brand-strong: #15803d;
  --trust: #3b82f6;
  --gold: #d4a83a;
  --danger: #ef4444;
  --shadow: 0 20px 38px rgba(0, 0, 0, 0.55);
}

body {
  background:
    radial-gradient(circle at 8% 0%, rgba(34, 197, 94, 0.12) 0, transparent 28%),
    radial-gradient(circle at 92% 100%, rgba(59, 130, 246, 0.1) 0, transparent 24%),
    linear-gradient(180deg, #050608 0%, #070a10 100%);
  color: var(--text);
}

.exec-header {
  background: rgba(7, 10, 16, 0.92);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(10px);
}

.exec-header-left p {
  color: var(--muted);
  border: 1px solid #2f3b4d;
  background: rgba(17, 22, 31, 0.88);
}

.exec-header-left strong {
  color: var(--text);
}

.header-action-btn,
.event-add-btn,
.filter-btn,
.function-menu-tab,
.bottom-action-btn,
.menu-search-clear,
.screen-switch-btn,
.dish-check,
.dish-edit-btn,
.dish-delete-btn,
.category-manager-btn,
.portion-control,
.labour-summary-edit {
  border-color: #34445a;
  background: #111a2a;
  color: #dce6f5;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.28);
}

.header-action-btn:hover,
.bottom-action-btn:hover,
.menu-search-clear:hover {
  border-color: #22c55e;
  box-shadow: 0 10px 22px rgba(34, 197, 94, 0.22);
  transform: translateY(-1px);
}

.header-action-btn[data-bottom-action="quotation"],
.bottom-action-btn[data-bottom-action="quotation"] {
  border-color: rgba(34, 197, 94, 0.72);
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.24) 0%, rgba(21, 33, 26, 0.98) 100%);
  color: #dcfce7;
}

.header-action-btn[data-bottom-action="quotation-share"],
.bottom-action-btn[data-bottom-action="quotation-share"] {
  border-color: rgba(59, 130, 246, 0.7);
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.24) 0%, rgba(18, 28, 46, 0.98) 100%);
  color: #dbeafe;
}

.header-action-btn[data-bottom-action="grocery"] {
  border-color: rgba(212, 168, 58, 0.72);
  background: linear-gradient(180deg, rgba(212, 168, 58, 0.22) 0%, rgba(39, 31, 18, 0.98) 100%);
  color: #fef3c7;
}

.screen-switcher,
.event-section,
.menu-section,
.cost-summary-card,
.extra-cost-card,
.ingredient-rate-card,
.labour-card,
.per-plate-card,
.bi-card,
.bottom-action-card,
.function-menu-card,
.final-selection {
  border-color: var(--line);
  background:
    linear-gradient(180deg, rgba(20, 26, 36, 0.96) 0%, rgba(14, 18, 27, 0.98) 100%),
    radial-gradient(circle at 100% -10%, rgba(34, 197, 94, 0.08), transparent 42%);
  box-shadow: var(--shadow);
}

.event-section,
.menu-section,
.cost-summary-card {
  position: relative;
  overflow: hidden;
}

.event-section::before,
.menu-section::before,
.cost-summary-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.68), rgba(59, 130, 246, 0.62), rgba(212, 168, 58, 0.62));
}

.event-manager,
.category-manager,
.final-function-block,
.menu-filters {
  border-color: #2e3a4d;
  background: #121824;
}

.event-tab,
.menu-card,
.final-dish-item,
.function-guest-item,
.bi-optimization {
  border-color: #2f3a4d;
  background: linear-gradient(180deg, #121a29 0%, #0e1521 100%);
}

.event-tab.is-active,
.menu-card.is-selected {
  border-color: #22c55e;
  background: linear-gradient(180deg, #153022 0%, #101f18 100%);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.24), 0 16px 30px rgba(0, 0, 0, 0.45);
}

.menu-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.45);
  transform: translateY(-1px);
}

.menu-subcategory-heading {
  border-color: #2e3a4e;
  border-left-color: rgba(34, 197, 94, 0.9);
  background: linear-gradient(90deg, rgba(19, 32, 26, 0.96) 0%, rgba(14, 22, 34, 0.98) 100%);
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.15);
}

.menu-subcategory-title {
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0.01em;
}

.menu-subcategory-count {
  border-color: #324156;
  background: #101827;
  color: #c7d2fe;
}

.menu-card h2,
.final-function-title,
.final-dish-name,
.cost-summary-card h3,
.extra-cost-card summary,
.ingredient-rate-card summary,
.labour-card h3,
.per-plate-card h3,
.bi-card h3,
.event-tab-title {
  color: var(--text);
}

.menu-card > span {
  border-color: rgba(212, 168, 58, 0.66);
  background: rgba(59, 43, 17, 0.84);
  color: #fde68a;
}

.event-tab-meta,
.menu-subtitle,
.menu-selection-summary,
.menu-meta,
.function-menu-note,
.field-helper,
.per-plate-note,
.bi-note,
.cost-big-label,
.ingredient-list,
.final-selection-empty,
.function-guest-note,
.cost-breakdown-grid p,
.bi-grid p,
.mobile-sheet-body {
  color: var(--muted);
}

.filter-btn.is-active,
.function-menu-tab.is-active {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.2);
  color: #dbeafe;
  box-shadow: 0 8px 16px rgba(59, 130, 246, 0.18);
}

.dish-edit-btn {
  border-color: rgba(59, 130, 246, 0.68);
  background: rgba(37, 99, 235, 0.2);
  color: #bfdbfe;
}

.dish-delete-btn,
.subcategory-delete-btn,
.category-manager-btn.danger,
.final-remove-btn {
  border-color: rgba(239, 68, 68, 0.68);
  background: rgba(127, 29, 29, 0.4);
  color: #fecaca;
}

.field input,
.field select,
.menu-search-field input,
.category-manager input,
.category-manager select,
.function-guest-item input,
.ingredient-rate-table input,
.labour-input {
  border-color: #354459;
  background: #0d1421;
  color: var(--text);
}

.field input::placeholder,
.menu-search-field input::placeholder,
.category-manager input::placeholder {
  color: #7f8ea2;
}

.field input:focus,
.field select:focus,
.menu-search-field input:focus,
.category-manager input:focus,
.category-manager select:focus,
.function-guest-item input:focus,
.ingredient-rate-table input:focus,
.labour-input:focus {
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.24);
}

.cost-big-number,
.extra-cost-total,
.labour-grand-total,
.per-plate-line.is-strong,
.final-function-total {
  color: #86efac;
}

.cost-big-note {
  color: #fcd34d;
}

.cost-breakdown-grid p,
.bi-grid p,
.ingredient-rate-table-wrap,
.labour-table,
.ingredient-rate-table th,
.labour-table th,
.ingredient-rate-table td,
.labour-table td {
  border-color: #2e3a4c;
}

.ingredient-rate-table th,
.labour-table th {
  background: #141d2d;
  color: #d9e4f3;
}

.ingredient-rate-table tbody tr:nth-child(odd) td,
.labour-table tbody tr:nth-child(odd) td {
  background: #111826;
}

.mobile-cost-sheet {
  border: 1px solid #2f3a4d;
  background: rgba(8, 12, 18, 0.96);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.45);
}

.mobile-sheet-toggle {
  border: 1px solid #2f3a4d;
  background: #0e1624;
  color: var(--text);
}

.mobile-sheet-body {
  border-top-color: #2f3a4d;
}

.app-toast {
  border: 1px solid #334155;
  background: rgba(12, 18, 29, 0.96);
  color: #e5edf8;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.42);
}

@media (max-width: 760px) {
  body {
    background:
      radial-gradient(circle at 14% 0%, rgba(34, 197, 94, 0.1) 0, transparent 24%),
      radial-gradient(circle at 88% 100%, rgba(59, 130, 246, 0.08) 0, transparent 22%),
      #050608;
  }

  .exec-header-left p {
    border: 1px solid #2f3a4d;
    background: #0f1624;
  }
}
