:root {
  color-scheme: dark;
  --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-size-sm: 12px;
  --font-size-body: 16px;
  --font-size-md: 18px;
  --font-size-lg: 22px;
  --font-size-title: clamp(32px, 4vw, 48px);
  --line-height-tight: 1.2;
  --line-height-base: 1.45;
  --line-height-loose: 1.65;

  --color-bg: #141210;
  --color-bg-soft: #1b1815;
  --color-card: #211d19;
  --color-card-hover: #29231e;
  --color-border: #373029;
  --color-border-strong: #4b4037;
  --color-text: #f5eee6;
  --color-text-muted: #b9ada2;
  --color-text-soft: #8f8278;
  --color-accent: #d97943;
  --color-accent-hover: #ef8b55;
  --color-success: #4fb477;
  --color-warning: #e6b84f;
  --color-danger: #e46e61;
  --color-info: #68a8e8;
  --color-success-soft: rgba(79, 180, 119, .16);
  --color-warning-soft: rgba(230, 184, 79, .18);
  --color-danger-soft: rgba(228, 110, 97, .17);
  --color-info-soft: rgba(104, 168, 232, .16);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;

  --radius-sm: 8px;
  --radius-md: 11px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-pill: 999px;

  --shadow-soft: 0 12px 30px rgba(0, 0, 0, .18);
  --shadow-card: 0 18px 44px rgba(0, 0, 0, .24);
  --shadow-elevated: 0 28px 70px rgba(0, 0, 0, .34);
  --focus: 0 0 0 3px rgba(217, 121, 67, .28);
  --touch-target: 48px;
  --touch-target-ipad: 56px;

  --bg: var(--color-bg);
  --surface: var(--color-card);
  --surface-soft: var(--color-bg-soft);
  --surface-warm: #27211c;
  --sidebar: #100e0d;
  --ink: var(--color-text);
  --muted: var(--color-text-muted);
  --accent: var(--color-accent);
  --accent-dark: var(--color-accent-hover);
  --line: var(--color-border);
  --line-strong: var(--color-border-strong);
  --success: var(--color-success-soft);
  --warning: var(--color-warning-soft);
  --danger: var(--color-danger-soft);
  --error: var(--color-danger-soft);
  --shadow: var(--shadow-card);
}

/* Supply orders: Staff ordering without prices and director analytics. */
.staff-home-quick-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.staff-home-supply-card .btn {
  margin-top: auto;
}

.staff-supply-body {
  min-height: 100vh;
  background: #191714;
  color: #f6f1ea;
}

.staff-supply-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding-bottom: 120px;
}

.staff-supply-topbar {
  margin-bottom: 24px;
}

.staff-supply-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  padding: 28px;
  border: 1px solid #4f4740;
  border-radius: 8px;
  background: #24201c;
}

.staff-supply-hero h1 {
  margin: 6px 0 8px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1;
  letter-spacing: 0;
}

.staff-supply-hero p,
.staff-supply-product-copy span,
.staff-supply-category-head span,
.staff-supply-history-head span,
.staff-supply-history-list span {
  color: #b9afa5;
}

.staff-supply-count {
  min-width: 128px;
  text-align: right;
}

.staff-supply-count strong {
  display: block;
  font-size: 42px;
  line-height: 1;
}

.staff-supply-count span {
  display: block;
  margin-top: 8px;
  color: #b9afa5;
}

.staff-supply-notice {
  margin-top: 18px;
}

.staff-supply-needed-date {
  margin: 24px 0 0;
  padding: 22px;
  border: 1px solid #4f4740;
  border-radius: 8px;
  background: #24201c;
}

.staff-supply-needed-date legend {
  padding: 0 8px;
  font-size: 18px;
  font-weight: 800;
}

.staff-supply-date-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.staff-supply-date-options label {
  min-width: 0;
  cursor: pointer;
}

.staff-supply-date-options input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.staff-supply-date-options label > span {
  display: grid;
  gap: 3px;
  min-height: 92px;
  padding: 14px;
  box-sizing: border-box;
  border: 1px solid #625850;
  border-radius: 7px;
  background: #191714;
}

.staff-supply-date-options strong,
.staff-supply-date-options b,
.staff-supply-date-options small {
  display: block;
  overflow-wrap: anywhere;
}

.staff-supply-date-options b {
  color: #fff;
  font-size: 22px;
}

.staff-supply-date-options small {
  color: #b9afa5;
}

.staff-supply-date-options input:checked + span {
  border-color: #ef8a4d;
  background: rgba(239, 138, 77, .12);
  box-shadow: inset 0 0 0 1px #ef8a4d;
}

.staff-supply-date-options input:focus-visible + span {
  outline: 3px solid rgba(239, 138, 77, .3);
  outline-offset: 2px;
}

.staff-supply-insight {
  margin-top: 14px;
  padding: 16px 18px;
  border-left: 4px solid #68a8e8;
  background: rgba(104, 168, 232, .1);
}

.staff-supply-insight strong,
.staff-supply-insight p {
  display: block;
}

.staff-supply-insight p {
  margin: 5px 0 0;
  color: #c5bbb1;
}

.staff-supply-category-list {
  display: grid;
  gap: 22px;
  margin-top: 24px;
}

.staff-supply-category {
  overflow: hidden;
  border: 1px solid #4f4740;
  border-radius: 8px;
  background: #24201c;
}

.staff-supply-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  border-bottom: 1px solid #4f4740;
  background: #2e2924;
}

.staff-supply-category-head h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0;
}

.staff-supply-products {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.staff-supply-product {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 18px 20px;
  border-bottom: 1px solid #3d3731;
}

.staff-supply-product:nth-child(odd) {
  border-right: 1px solid #3d3731;
}

.staff-supply-product-copy {
  min-width: 0;
}

.staff-supply-product-copy strong,
.staff-supply-product-copy span {
  display: block;
  overflow-wrap: anywhere;
}

.staff-supply-product-copy strong {
  font-size: 17px;
  line-height: 1.25;
}

.staff-supply-product-copy span {
  margin-top: 5px;
  font-size: 13px;
}

.staff-supply-product-recommendation {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.staff-supply-product-recommendation[hidden] {
  display: none;
}

.staff-supply-product-recommendation span {
  margin: 0;
  color: #93c4f2;
  font-weight: 700;
}

.staff-supply-product-recommendation button {
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid #68a8e8;
  border-radius: 6px;
  background: transparent;
  color: #b9dcff;
  font-weight: 800;
  cursor: pointer;
}

.staff-supply-stepper {
  display: grid;
  grid-template-columns: 44px 64px 44px;
  height: 46px;
  border: 1px solid #625850;
  border-radius: 6px;
  overflow: hidden;
}

.staff-supply-stepper button,
.staff-supply-stepper input {
  width: 100%;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: #191714;
  color: #fff;
  text-align: center;
  font: inherit;
  font-size: 20px;
  font-weight: 800;
}

.staff-supply-stepper button {
  color: #ef8a4d;
  cursor: pointer;
}

.staff-supply-stepper input {
  border-inline: 1px solid #625850;
  appearance: textfield;
}

.staff-supply-stepper input::-webkit-inner-spin-button,
.staff-supply-stepper input::-webkit-outer-spin-button {
  appearance: none;
}

.staff-supply-comment {
  display: grid;
  gap: 8px;
  margin-top: 22px;
  padding: 22px;
  border: 1px solid #4f4740;
  border-radius: 8px;
  background: #24201c;
}

.staff-supply-comment label {
  font-weight: 800;
}

.staff-supply-comment textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #625850;
  border-radius: 6px;
  background: #191714;
  color: #fff;
}

.staff-supply-submit-bar {
  position: sticky;
  z-index: 20;
  bottom: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  margin-top: 24px;
  padding: 16px 18px;
  border: 1px solid #665b51;
  border-radius: 8px;
  background: rgba(25, 23, 20, .96);
  box-shadow: 0 12px 36px rgba(0, 0, 0, .35);
  backdrop-filter: blur(12px);
}

.staff-supply-submit-bar span,
.staff-supply-submit-bar strong {
  display: block;
}

.staff-supply-submit-bar > div > span {
  color: #b9afa5;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.staff-supply-submit-bar button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.staff-supply-history {
  margin-top: 34px;
}

.staff-supply-history-head,
.staff-supply-history-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.staff-supply-history-head h2 {
  margin: 0;
}

.staff-supply-history-list {
  margin-top: 12px;
  border: 1px solid #4f4740;
  border-radius: 8px;
  overflow: hidden;
}

.staff-supply-history-list article {
  padding: 16px 18px;
  border-bottom: 1px solid #3d3731;
  background: #24201c;
}

.staff-supply-history-list article:last-child {
  border-bottom: 0;
}

.staff-supply-history-list article > div:last-child {
  text-align: right;
}

.staff-supply-history-list strong,
.staff-supply-history-list span {
  display: block;
}

.supply-order-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 14px;
}

.supply-order-filters label {
  min-width: 0;
}

.supply-order-filters input,
.supply-order-filters select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.supply-order-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.supply-order-history-section {
  margin-top: 28px;
}

.supply-order-history-list {
  display: grid;
  gap: 18px;
}

.supply-order-card {
  min-width: 0;
  overflow: hidden;
  padding: 0;
}

.supply-order-card > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
  padding: 22px;
}

.supply-order-card h3,
.supply-order-card p {
  margin: 4px 0 0;
}

.supply-order-card-total {
  text-align: right;
}

.supply-order-card-total span,
.supply-order-card-total strong,
.supply-order-card-total small,
.supply-order-items-table td small {
  display: block;
}

.supply-order-card-total strong {
  margin: 5px 0;
  font-size: 25px;
}

.supply-order-comment {
  margin: 0 22px 18px;
  padding: 12px 14px;
  border-left: 3px solid #e8793d;
  background: rgba(232, 121, 61, .08);
}

.supply-order-items-table {
  min-width: 720px;
}

@media (max-width: 1180px) {
  .staff-home-quick-summary,
  .supply-order-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .staff-supply-products {
    grid-template-columns: 1fr;
  }

  .staff-supply-product:nth-child(odd) {
    border-right: 0;
  }

  .supply-order-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .supply-order-filters .button {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .staff-home-quick-summary,
  .supply-order-metrics,
  .supply-order-filters,
  .staff-supply-hero,
  .staff-supply-submit-bar,
  .supply-order-card > header {
    grid-template-columns: 1fr;
  }

  .staff-supply-hero,
  .staff-supply-category-head,
  .staff-supply-comment,
  .staff-supply-needed-date {
    padding: 18px;
  }

  .staff-supply-count,
  .supply-order-card-total {
    text-align: left;
  }

  .staff-supply-product {
    grid-template-columns: minmax(0, 1fr) 136px;
    padding: 15px 14px;
  }

  .staff-supply-stepper {
    grid-template-columns: 40px 56px 40px;
  }

  .staff-supply-submit-bar .staff-primary-action {
    width: 100%;
  }
}

/* Director supply catalog. */
.supply-products-table {
  min-width: 980px;
  table-layout: auto;
}

.supply-products-table th:first-child,
.supply-products-table td:first-child {
  width: 92px;
}

.supply-products-table th:last-child,
.supply-products-table td:last-child {
  width: 220px;
}

.supply-price-warning {
  display: block;
  color: var(--color-warning, #b57a16) !important;
  font-weight: 750;
}

.supply-audit-panel {
  margin-top: 20px;
}

.supply-sort-actions {
  margin-top: 18px;
}

.supply-search-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  margin: 20px 0 24px;
  padding: 18px;
}

.supply-category-list {
  display: grid;
  gap: 24px;
}

.supply-category-section {
  overflow: hidden;
}

.supply-category-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-soft);
}

.supply-category-title h2 {
  margin: 0;
  color: var(--color-text);
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: uppercase;
}

.supply-category-title strong {
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  border: 1px solid var(--color-border-strong);
  border-radius: 50%;
  color: var(--color-text-muted);
  font-size: 15px;
}

.supply-category-picker {
  margin: 0;
  padding: 0;
  border: 0;
}

.supply-category-picker legend {
  margin-bottom: 10px;
  color: var(--color-text-muted);
  font-weight: 800;
}

.supply-category-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.supply-category-options label {
  position: relative;
  min-width: 0;
}

.supply-category-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.supply-category-options span {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  background: var(--color-bg-soft);
  font-weight: 800;
  cursor: pointer;
}

.supply-category-options input:checked + span {
  border-color: var(--color-accent);
  color: var(--color-text);
  background: rgba(217, 121, 67, .16);
  box-shadow: var(--focus);
}

.supply-category-options input:focus-visible + span {
  box-shadow: var(--focus);
}

.supply-sort-head {
  margin-bottom: 20px;
}

@media (max-width: 720px) {
  .supply-products-table {
    min-width: 0;
  }

  .supply-search-panel,
  .supply-category-options {
    grid-template-columns: 1fr;
  }

  .supply-category-title {
    padding: 18px;
  }

  .supply-category-title h2 {
    font-size: 22px;
  }
}

/* Friday count: one focused Staff workflow for consumables and carryover goods. */
.friday-count-shell {
  max-width: 980px;
  padding-bottom: 140px;
}

.friday-count-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 24px;
  align-items: end;
  padding: 34px 0 24px;
}

.friday-count-hero h1 {
  margin: 8px 0 10px;
  font-size: 48px;
  letter-spacing: 0;
}

.friday-count-hero p,
.friday-count-section-head p {
  margin: 0;
  color: var(--muted);
}

.friday-count-status {
  min-height: 112px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #24201c;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.friday-count-status span,
.friday-count-status small {
  color: var(--muted);
}

.friday-count-status strong {
  margin: 5px 0;
  font-size: 26px;
}

.friday-count-status.is-submitted {
  border-color: #4f805d;
  background: #1f2c22;
}

.friday-count-progress {
  margin-bottom: 22px;
}

.friday-count-progress > div {
  height: 8px;
  overflow: hidden;
  border-radius: 4px;
  background: #35302a;
}

.friday-count-progress > div span {
  display: block;
  height: 100%;
  background: #e47a3f;
}

.friday-count-progress p {
  margin: 8px 0 0;
  color: var(--muted);
  text-align: right;
}

.friday-count-submitted {
  margin: 18px 0;
  padding: 22px;
  border: 1px solid #4f805d;
  border-radius: 8px;
  background: #1f2c22;
}

.friday-count-submitted h2 {
  margin: 12px 0 4px;
}

.friday-count-submitted p {
  margin: 0 0 14px;
  color: var(--muted);
}

.friday-count-submitted > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.friday-count-submitted > div span {
  padding: 7px 10px;
  border: 1px solid #42684c;
  border-radius: 6px;
  background: #18221b;
}

.friday-count-form {
  display: grid;
  gap: 24px;
}

.friday-count-section {
  padding: 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #201d19;
}

.friday-count-section.long-life {
  border-color: #5f7557;
  background: #20251d;
}

.friday-count-section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 18px;
}

.friday-count-section-head h2 {
  margin: 5px 0 0;
  font-size: 27px;
}

.friday-count-section-head > span {
  color: var(--muted);
}

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

.friday-count-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 126px;
  gap: 14px;
  align-items: center;
  min-height: 76px;
  padding: 12px 14px;
  border: 1px solid #4a443d;
  border-radius: 8px;
  background: #181614;
  cursor: text;
}

.friday-count-row:focus-within {
  border-color: #e47a3f;
  box-shadow: 0 0 0 2px rgba(228, 122, 63, 0.2);
}

.friday-count-marker {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #4a443d;
  border-radius: 7px;
  background: #25211d;
  font-size: 22px;
}

.friday-count-product {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.friday-count-product strong {
  overflow-wrap: anywhere;
  font-size: 18px;
}

.friday-count-product small {
  color: var(--muted);
}

.friday-count-row input {
  width: 100%;
  min-height: 50px;
  margin: 0;
  text-align: center;
  font-size: 22px;
  font-weight: 800;
}

.friday-count-actions {
  position: sticky;
  bottom: 14px;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border: 1px solid #50483f;
  border-radius: 8px;
  background: rgba(24, 21, 18, 0.97);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.34);
}

.friday-count-actions > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.friday-count-actions > div span {
  color: var(--muted);
}

.friday-count-actions button {
  min-height: 52px;
  white-space: normal;
}

.friday-report-filter form {
  display: flex;
  gap: 12px;
  align-items: end;
}

.friday-report-filter label {
  min-width: 240px;
}

.friday-report-point {
  margin-top: 22px;
}

.friday-report-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 22px;
}

.friday-report-summary .owner-summary-card {
  min-height: 116px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #201d19;
  box-shadow: none;
}

.friday-report-summary .owner-summary-card span,
.friday-report-summary .owner-summary-card small {
  color: var(--muted);
}

.friday-report-summary .owner-summary-card.tone-success strong {
  color: #8ed7a7;
}

.friday-report-summary .owner-summary-card.tone-warning strong {
  color: #f2ce76;
}

.friday-report-summary .owner-summary-card.tone-critical strong {
  color: #f1a098;
}

.friday-report-point-head {
  align-items: center;
}

.friday-report-block {
  margin-top: 22px;
}

.friday-report-block h3 {
  margin: 0 0 12px;
  font-size: 21px;
}

.friday-report-block.consumables {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.friday-report-block.consumables p {
  color: var(--muted);
}

.friday-report-consumables {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.friday-report-consumables > div {
  min-height: 82px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #1b1815;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.friday-report-consumables span {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.friday-report-consumables strong {
  font-size: 24px;
}

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

  .friday-count-status {
    min-height: 0;
  }

  .friday-count-actions {
    grid-template-columns: 1fr 1fr;
  }

  .friday-count-actions > div {
    grid-column: 1 / -1;
  }

  .friday-report-consumables {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 760px) {
  .friday-report-head .page-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
  }

  .page-head.friday-report-head .button {
    display: inline-flex;
    width: 100%;
  }
}

@media (max-width: 560px) {
  .friday-count-section {
    padding: 18px 12px;
  }

  .friday-count-section-head {
    align-items: start;
  }

  .friday-count-row {
    grid-template-columns: 42px minmax(0, 1fr) 86px;
    gap: 9px;
    padding: 10px;
  }

  .friday-count-marker {
    width: 38px;
    height: 38px;
    font-size: 19px;
  }

  .friday-count-product strong {
    font-size: 16px;
  }

  .friday-count-actions {
    position: static;
    grid-template-columns: 1fr;
  }

  .friday-count-actions > div {
    grid-column: auto;
  }

  .friday-report-filter form,
  .friday-report-point-head {
    align-items: stretch;
    flex-direction: column;
  }

  .friday-report-filter label {
    min-width: 0;
  }

  .friday-report-consumables {
    grid-template-columns: 1fr;
  }

  .friday-report-summary {
    grid-template-columns: 1fr;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--ink); font: var(--font-size-body)/var(--line-height-base) var(--font-base); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, .button { border: 0; cursor: pointer; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 260px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 24px 18px; background: var(--sidebar); color: #fff; }
.sidebar-brand { display: flex; align-items: center; gap: 12px; margin: 0 8px 28px; }
.sidebar-brand strong { display: block; font-size: 20px; }
.sidebar-brand small { display: block; color: #9c958d; }
.logo-mark { width: 66px; height: 66px; display: grid; place-items: center; border-radius: 20px; background: var(--accent); color: white; font-weight: 900; letter-spacing: -.04em; }
.logo-mark.small { width: 42px; height: 42px; border-radius: 13px; font-size: 14px; }
.sidebar nav { display: grid; gap: 5px; }
.sidebar nav a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 13px; border-radius: 12px; color: #c9c4be; }
.sidebar nav a:hover, .sidebar nav a.active { color: white; background: #302c27; }
.nav-icon { width: 24px; text-align: center; font-size: 20px; }
.sidebar-user { margin-top: auto; display: grid; grid-template-columns: 38px 1fr 34px; align-items: center; gap: 10px; padding: 14px 8px 0; border-top: 1px solid #38332e; }
.avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: #3f3933; font-weight: 800; }
.user-copy { min-width: 0; }
.user-copy strong, .user-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-copy small { color: #928b83; text-transform: capitalize; }
.icon-button { width: 34px; height: 34px; border-radius: 10px; background: #302c27; color: white; }
.content { min-width: 0; }
.content-inner { max-width: 1500px; margin: 0 auto; padding: 38px 40px 70px; }
.mobile-header, .mobile-nav { display: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.page-head h1 { margin: 3px 0 4px; font-size: clamp(32px, 4vw, 48px); letter-spacing: -.04em; }
.page-head p, .section-head p { margin: 0; color: var(--muted); }
.eyebrow { color: #7d3818; font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.panel, .metric { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.panel { padding: 22px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.metric { padding: 20px; }
.metric span, .metric small { display: block; color: var(--muted); }
.metric strong { display: block; margin: 5px 0; font-size: 34px; letter-spacing: -.04em; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 18px; }
.section-head h2 { margin: 0 0 3px; font-size: 21px; }
.section-head a { color: var(--accent-dark); font-weight: 700; }
.split-layout { display: grid; grid-template-columns: minmax(330px, .72fr) minmax(0, 1.5fr); gap: 20px; align-items: start; }
.users-layout { grid-template-columns: minmax(360px, .8fr) minmax(0, 1.2fr); }
.sticky-form { position: sticky; top: 24px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.full { grid-column: 1 / -1; }
label { display: grid; gap: 7px; font-weight: 700; }
input, select, textarea { width: 100%; min-height: 49px; padding: 11px 13px; border: 1px solid #d4cdc5; border-radius: 11px; background: white; color: var(--ink); }
textarea { resize: vertical; }
.primary, .secondary, .button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; padding: 11px 18px; border-radius: 11px; font-weight: 800; }
.primary { background: var(--accent); color: white; }
.primary:hover { background: var(--accent-dark); }
.table-panel { padding: 0; overflow: hidden; }
.table-panel .section-head { padding: 22px 22px 0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; min-width: 720px; border-collapse: collapse; }
th, td { padding: 13px 15px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #f7f5f2; color: var(--muted); font-size: 12px; letter-spacing: .05em; text-transform: uppercase; }
.number { font-weight: 800; }
.tag { display: inline-block; padding: 5px 9px; border-radius: 999px; background: #f0e8e1; font-size: 13px; }
.empty { padding: 42px; text-align: center; color: var(--muted); }
.notice { margin-bottom: 18px; padding: 13px 15px; border-radius: 11px; }
.success { background: var(--success); }
.error { background: var(--error); }

.skip-link {
  position: fixed;
  z-index: 1000;
  top: var(--space-3);
  left: var(--space-3);
  transform: translateY(-160%);
  min-height: var(--touch-target);
  display: inline-flex;
  align-items: center;
  padding: 0 var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-accent);
  color: #100e0d;
  font-weight: 850;
  box-shadow: var(--shadow-elevated);
}
.skip-link:focus-visible { transform: translateY(0); outline: none; box-shadow: var(--focus), var(--shadow-elevated); }

.container, .page-container { width: min(100%, 1500px); margin-inline: auto; }
.page-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-5); margin-bottom: var(--space-6); }
.section { margin-block: var(--space-6); }
.grid { display: grid; gap: var(--space-4); }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stack { display: grid; gap: var(--space-4); }
.stack-sm { display: grid; gap: var(--space-2); }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.responsive-scroll { width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

.card, .panel, .metric-card, .metric, .task-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.card, .metric-card, .task-card { padding: var(--space-5); }
.card:hover, .panel:hover, .metric-card:hover, .task-card:hover { background: var(--color-card-hover); border-color: var(--color-border-strong); }

.btn, .btn-primary, .btn-secondary, .btn-danger, .btn-success, .btn-ghost,
.primary, .secondary, .button {
  min-height: var(--touch-target);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0 var(--space-5);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-weight: 850;
  line-height: 1;
  text-align: center;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, color .15s ease;
}
.btn-primary, .primary { background: var(--color-accent); color: #100e0d; }
.btn-primary:hover, .primary:hover { background: var(--color-accent-hover); }
.btn-secondary, .secondary, .button.secondary { background: var(--color-bg-soft); border-color: var(--color-border-strong); color: var(--color-text); }
.btn-secondary:hover, .secondary:hover, .button.secondary:hover { background: var(--color-card-hover); }
.btn-danger { background: var(--color-danger); color: #130b09; }
.btn-success { background: var(--color-success); color: #07120b; }
.btn-ghost { background: transparent; border-color: var(--color-border); color: var(--color-text-muted); }
.btn-ghost:hover { background: var(--color-card-hover); color: var(--color-text); }
.btn-sm { min-height: 38px; padding-inline: var(--space-3); font-size: var(--font-size-sm); }
.btn-lg { min-height: var(--touch-target-ipad); padding-inline: var(--space-6); font-size: var(--font-size-md); border-radius: var(--radius-lg); }
.btn:disabled, .btn-primary:disabled, .btn-secondary:disabled, .btn-danger:disabled, .btn-success:disabled, .btn-ghost:disabled,
.primary:disabled, .secondary:disabled, .button:disabled { cursor: default; opacity: .48; transform: none; box-shadow: none; }

input, select, textarea {
  min-height: var(--touch-target);
  border-color: var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-bg-soft);
  color: var(--color-text);
  accent-color: var(--color-accent);
}
input::placeholder, textarea::placeholder { color: var(--color-text-soft); }
input:disabled, select:disabled, textarea:disabled { opacity: .58; cursor: not-allowed; }
label { color: var(--color-text); }
fieldset { min-width: 0; border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-5); }
legend { padding-inline: var(--space-2); color: var(--color-text-muted); font-weight: 850; }
.field-error, .error-text, .validation-error { color: var(--color-danger); font-weight: 800; }

table { color: var(--color-text); }
th { background: var(--color-bg-soft); color: var(--color-text-muted); }
td { color: var(--color-text); }
tbody tr:hover { background: rgba(255, 255, 255, .03); }
.td-muted, .cell-muted { color: var(--color-text-muted); }
.table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-sticky th { position: sticky; top: 0; z-index: 1; }

.badge, .badge-success, .badge-warning, .badge-danger, .badge-info, .status-pill {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  gap: var(--space-2);
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-sm);
  font-weight: 900;
  line-height: 1.15;
  white-space: nowrap;
}
.badge, .status-pill { background: var(--color-bg-soft); color: var(--color-text-muted); }
.badge-success, .status-pill.success { background: var(--color-success-soft); color: #8ce0aa; }
.badge-warning, .status-pill.warning { background: var(--color-warning-soft); color: #f2ce76; }
.badge-danger, .status-pill.danger, .status-pill.critical { background: var(--color-danger-soft); color: #f1a098; }
.badge-info, .status-pill.info { background: var(--color-info-soft); color: #9ccbf3; }

.staff-page { min-height: 100vh; min-height: 100dvh; background: var(--color-bg); color: var(--color-text); }
.staff-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-4); }
.staff-action-card {
  min-height: 132px;
  display: grid;
  gap: var(--space-3);
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-card);
  box-shadow: var(--shadow-card);
}
.staff-primary-action {
  min-height: var(--touch-target-ipad);
  border-radius: var(--radius-lg);
  background: var(--color-accent);
  color: #100e0d;
  font-weight: 900;
}
.staff-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  border-radius: var(--radius-pill);
  background: var(--color-bg-soft);
  color: var(--color-text-muted);
  font-weight: 900;
}
.touch-control { min-height: var(--touch-target-ipad); min-width: var(--touch-target-ipad); touch-action: manipulation; }
.empty-state { min-height: 350px; display: grid; place-items: center; align-content: center; text-align: center; }
.empty-state p { max-width: 620px; color: var(--muted); }
.empty-icon { font-size: 64px; color: var(--accent); }
.inline-form { display: flex; gap: 12px; }
.inline-form button { flex: 0 0 auto; }
.settings-block { max-width: 850px; }
.settings-list { display: grid; gap: 10px; margin-top: 22px; }
.settings-list > div { display: grid; grid-template-columns: 14px 1fr auto; align-items: center; gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; }
.settings-list small { color: var(--muted); }
.import-panel { max-width: 850px; }
.excel-format { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 22px; }
.excel-format span { padding: 10px; border-radius: 9px; background: #f2eee9; color: var(--muted); text-align: center; font-size: 13px; font-weight: 750; }
.import-form { display: grid; gap: 18px; }
.file-picker { min-height: 112px; display: flex; align-items: center; gap: 18px; padding: 20px; border: 2px dashed #d1c7bd; border-radius: 16px; background: #fbfaf8; cursor: pointer; }
.file-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-picker strong, .file-picker small { display: block; }
.file-picker small { color: var(--muted); font-weight: 500; }
.file-icon { width: 62px; height: 62px; display: grid; place-items: center; border-radius: 14px; background: #e3f4e9; color: #278452; font-size: 12px; font-weight: 900; }
.import-result { max-width: 850px; display: flex; gap: 16px; margin-bottom: 18px; padding: 18px; border-radius: 15px; }
.import-result.success { background: var(--success); }
.import-result.error { background: var(--error); }
.import-result h2, .import-result p { margin: 0 0 4px; }
.result-icon-small { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.65); font-weight: 900; }
.import-status { display: inline-block; padding: 5px 9px; border-radius: 999px; font-size: 12px; font-weight: 850; text-transform: uppercase; }
.import-status.success { background: var(--success); color: #278452; }
.import-status.error { background: var(--error); color: #a13f2d; }
.import-status.skipped { background: #eee9e3; color: #6d655e; }
.import-error { max-width: 360px; white-space: pre-line; color: var(--muted); }
.catalog-layout { display: grid; grid-template-columns: minmax(320px, .65fr) minmax(0, 1.5fr); gap: 20px; align-items: start; }
.catalog-create { position: sticky; top: 24px; }
.catalog-create summary { display: flex; align-items: center; gap: 10px; padding-right: 42px; cursor: pointer; list-style: none; }
.catalog-create summary::-webkit-details-marker { display: none; }
.catalog-create summary span { font-size: 18px; font-weight: 850; }
.catalog-create summary small { color: var(--muted); }
.catalog-create summary small::before { content: "·"; margin-right: 10px; }
.catalog-create summary::after { content: "+"; position: absolute; top: 17px; right: 18px; display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 50%; font-size: 22px; font-weight: 500; }
.catalog-create[open] summary::after { content: "−"; }
.catalog-create-form { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.catalog-table { min-width: 0; overflow: hidden; }
.catalog-filters { display: grid; grid-template-columns: minmax(180px, 1fr) 190px auto auto; gap: 10px; padding: 18px; border-bottom: 1px solid var(--line); }
.catalog-check { display: flex; align-items: center; gap: 8px; padding: 0 8px; white-space: nowrap; font-weight: 600; }
.catalog-check input { width: 20px; min-height: 20px; }
.catalog-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; white-space: nowrap; }
.catalog-actions form { margin: 0; }
.catalog-actions .button { min-height: 36px; padding: 8px 11px; }
.catalog-products-table { width: 100%; min-width: 1080px; table-layout: fixed; }
.catalog-products-table th, .catalog-products-table td { vertical-align: middle; }
.catalog-products-table th { white-space: nowrap; }
.catalog-col-code { width: 72px; }
.catalog-col-name { width: 230px; }
.catalog-col-category { width: 130px; }
.catalog-col-price { width: 138px; }
.catalog-col-composition { width: auto; }
.catalog-col-status { width: 150px; }
.catalog-col-actions { width: 236px; }
.catalog-product-name { display: block; line-height: 1.3; }
.catalog-category { display: inline-flex; padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; background: #f7f5f2; color: #433a34; white-space: nowrap; font-size: 12px; font-weight: 750; }
.catalog-price { display: block; white-space: nowrap; }
.catalog-products-table td small { color: var(--muted); }
.catalog-composition { display: -webkit-box; overflow: hidden; color: var(--muted); line-height: 1.35; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.catalog-products-table .status-pill { white-space: nowrap; }
.catalog-products-table td[data-label="Статус"] { min-width: 140px; }
.catalog-products-table td[data-label="Действия"] { vertical-align: middle; }
.inactive-row { opacity: .58; }
.inactive-status { color: var(--muted); }
.product-edit-form { max-width: 720px; }
.status-dot { display: inline-flex; align-items: center; gap: 7px; }
.status-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #37a265; }
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #191714; }
.login-shell { width: min(920px, 100%); display: grid; grid-template-columns: 1.2fr .8fr; gap: 60px; align-items: center; color: white; }
.login-brand { display: flex; align-items: center; gap: 24px; }
.login-brand h1 { margin: 4px 0; font-size: clamp(48px, 8vw, 78px); letter-spacing: -.06em; }
.login-brand p { max-width: 480px; color: #aaa39b; font-size: 19px; }
.login-card { display: grid; gap: 17px; color: var(--ink); }
.login-card h2 { margin: 0; }
.staff-body {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  background:
    radial-gradient(circle at 15% 20%, rgba(213, 106, 54, .18), transparent 30%),
    radial-gradient(circle at 85% 80%, rgba(213, 106, 54, .08), transparent 28%),
    var(--sidebar);
  color: white;
  touch-action: manipulation;
}
.staff-login-shell {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: clamp(40px, 8vw, 90px);
  align-items: center;
}
.staff-brand { display: flex; align-items: center; gap: 26px; }
.staff-logo { flex: 0 0 auto; width: 82px; height: 82px; font-size: 24px; }
.staff-brand h1 { margin: 4px 0; font-size: clamp(54px, 8vw, 82px); letter-spacing: -.065em; }
.staff-brand p { max-width: 430px; margin: 0; color: #aaa39b; font-size: 20px; }
.staff-pin-card {
  padding: 30px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 28px;
  background: rgba(255,255,255,.07);
  box-shadow: 0 30px 80px rgba(0,0,0,.28);
  backdrop-filter: blur(18px);
}
.staff-error { color: var(--ink); text-align: center; }
.pin-display { display: flex; justify-content: center; gap: 20px; margin: 8px 0 30px; }
.pin-dot {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,.45);
  border-radius: 50%;
  transition: .16s ease;
}
.pin-dot.filled { border-color: var(--accent); background: var(--accent); transform: scale(1.08); }
.pin-keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pin-key {
  min-height: 76px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  background: rgba(255,255,255,.1);
  color: white;
  font-size: 30px;
  font-weight: 700;
  -webkit-tap-highlight-color: transparent;
}
.pin-key:active { background: rgba(213,106,54,.75); transform: scale(.97); }
.pin-clear, .pin-back { color: #c7c0b9; font-size: 22px; }
.staff-submit {
  width: 100%;
  min-height: 60px;
  margin-top: 18px;
  border-radius: 16px;
  background: var(--accent);
  color: white;
  font-size: 18px;
  font-weight: 800;
}
.staff-submit:disabled { cursor: default; opacity: .32; }
.staff-home-body { min-height: 100vh; background: var(--bg); }
.staff-home { max-width: 1100px; margin: 0 auto; padding: 26px; }
.staff-home-header { display: flex; justify-content: space-between; align-items: center; }
.staff-home-brand { display: flex; align-items: center; gap: 12px; }
.staff-home-brand strong, .staff-home-brand small { display: block; }
.staff-home-brand strong { font-size: 20px; }
.staff-home-brand small { color: var(--muted); }
.staff-logout { min-height: 44px; padding: 9px 16px; border-radius: 11px; background: #e9e3dc; color: var(--ink); font-weight: 750; }
.staff-welcome {
  min-height: 70vh;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
}
.staff-welcome h1 { margin: 6px 0; font-size: clamp(40px, 7vw, 68px); letter-spacing: -.05em; }
.staff-welcome p { max-width: 560px; color: var(--muted); font-size: 19px; }
.success-check { width: 76px; height: 76px; display: grid; place-items: center; margin-bottom: 24px; border-radius: 50%; background: var(--success); color: #278452; font-size: 38px; font-weight: 900; }
.staff-work-body {
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 90% 5%, rgba(213,106,54,.09), transparent 28%),
    var(--bg);
}
.staff-work-shell {
  width: min(1080px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) max(28px, env(safe-area-inset-right)) max(36px, env(safe-area-inset-bottom)) max(28px, env(safe-area-inset-left));
}
.staff-work-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.staff-work-header .staff-home-brand { color: var(--ink); }
.staff-today { max-width: 860px; margin: 54px auto 0; }
.staff-greeting h1 {
  margin: 5px 0 20px;
  font-size: clamp(46px, 7vw, 72px);
  letter-spacing: -.055em;
  line-height: 1;
}
.staff-greeting > p { margin: 36px 0 15px; color: var(--muted); font-size: 19px; font-weight: 650; }
.staff-location {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.7);
}
.staff-location small, .staff-location strong { display: block; }
.staff-location small { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.staff-location strong { font-size: 19px; }
.location-pin { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: #f4ddd2; color: var(--accent); font-size: 12px; }
.staff-task-card {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) 170px;
  align-items: center;
  gap: 24px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 18px 50px rgba(42,35,28,.08);
}
.staff-task-stack { display: grid; gap: 16px; }
.refrigerator-icon { background: #e5f2f8; }
.task-status.locked { color: var(--muted); }
.task-status.locked i { background: #aaa39b; }
.locked-task { opacity: .72; }
.staff-start-button.secondary-task { background: #ece7e1; color: var(--ink); box-shadow: none; }
.staff-start-button.disabled-task { background: #e6e1db; color: #8c847c; box-shadow: none; }
.task-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: #f8e9df;
  font-size: 40px;
}
.task-icon.large { width: 100px; height: 100px; margin-bottom: 24px; font-size: 50px; }
.task-copy h2 { margin: 8px 0 5px; font-size: clamp(25px, 3vw, 34px); letter-spacing: -.03em; }
.task-copy p { margin: 0; color: var(--muted); }
.task-status { display: inline-flex; align-items: center; gap: 7px; color: #9d5a27; font-size: 14px; font-weight: 750; }
.task-status i { width: 8px; height: 8px; border-radius: 50%; background: #e59a4d; }
.task-status.completed { color: #278452; }
.task-status.completed i { background: #37a265; }
.staff-start-button {
  min-height: 62px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--accent);
  color: white;
  font-size: 19px;
  font-weight: 850;
  box-shadow: 0 10px 24px rgba(213,106,54,.24);
}
.staff-start-button:active { transform: scale(.98); background: var(--accent-dark); }
.staff-progress { margin-top: 28px; padding: 0 8px; }
.staff-no-delivery, .delivery-empty {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.staff-no-delivery h2, .delivery-empty h2 { margin: 0 0 5px; font-size: 27px; }
.staff-no-delivery p, .delivery-empty p { margin: 0; color: var(--muted); }
.delivery-empty { min-height: 360px; flex-direction: column; justify-content: center; text-align: center; }
.progress-copy { display: flex; justify-content: space-between; margin-bottom: 10px; color: var(--muted); }
.progress-copy strong { color: var(--ink); }
.progress-track { height: 9px; overflow: hidden; border-radius: 999px; background: #dfd9d2; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.staff-delivery-placeholder {
  min-height: 72vh;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
}
.staff-delivery-placeholder h1 { margin: 7px 0; font-size: clamp(38px, 6vw, 64px); letter-spacing: -.05em; }
.staff-delivery-placeholder p { max-width: 580px; color: var(--muted); font-size: 19px; }
.staff-back-link { margin-bottom: 34px; color: var(--accent-dark); font-weight: 750; }
.delivery-shell { max-width: 1120px; }
.delivery-header {
  min-height: 72px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.staff-back-button {
  width: max-content;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  font-weight: 800;
}
.delivery-brand { margin: 0; }
.delivery-context { display: flex; justify-content: flex-end; gap: 28px; text-align: right; }
.delivery-context small, .delivery-context strong { display: block; }
.delivery-context small { color: var(--muted); font-size: 11px; letter-spacing: .07em; text-transform: uppercase; }
.delivery-context strong { font-size: 17px; }
.delivery-content, .problem-content { width: min(840px, 100%); margin: 48px auto 0; }
.delivery-content > h1, .problem-content > h1 {
  margin: 5px 0 28px;
  font-size: clamp(38px, 5.5vw, 62px);
  letter-spacing: -.055em;
  line-height: 1.05;
}
.delivery-manifest {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.delivery-manifest-head { display: flex; align-items: center; gap: 18px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.delivery-manifest-head h2 { margin: 0 0 3px; font-size: 25px; }
.delivery-manifest-head p { margin: 0; color: var(--muted); }
.delivery-list { display: grid; gap: 20px; padding-top: 25px; }
.delivery-list > div { display: flex; align-items: baseline; gap: 12px; font-size: 21px; }
.delivery-list i { flex: 1; border-bottom: 2px dotted #d5cec7; }
.delivery-list strong { min-width: 38px; text-align: right; font-size: 25px; }
.delivery-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 22px; }
.delivery-actions form { display: contents; }
.delivery-action {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 14px 20px;
  border-radius: 17px;
  font-size: 19px;
  font-weight: 850;
  text-align: center;
}
.delivery-action span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; }
.delivery-action.confirm { background: #2f9a61; color: white; }
.delivery-action.confirm span { background: rgba(255,255,255,.18); }
.delivery-action.problem { border: 2px solid #da7848; background: #fff7f2; color: #a84d24; }
.delivery-action.problem span { background: #f6ddcf; }
.problem-content > p { margin: -18px 0 26px; color: var(--muted); font-size: 18px; }
.problem-form {
  display: grid;
  gap: 20px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.problem-form input, .problem-form select { min-height: 60px; font-size: 18px; }
.problem-form textarea { font-size: 18px; }
.problem-submit {
  min-height: 66px;
  border-radius: 16px;
  background: var(--accent);
  color: white;
  font-size: 20px;
  font-weight: 850;
}
.staff-result-body {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  background:
    radial-gradient(circle at 50% 20%, rgba(213,106,54,.10), transparent 35%),
    var(--bg);
}
.staff-result-card { width: min(650px, 100%); text-align: center; }
.staff-result-card h1 { margin: 8px 0; font-size: clamp(42px, 7vw, 68px); letter-spacing: -.055em; line-height: 1.05; }
.staff-result-card p { margin: 0 0 34px; color: var(--muted); font-size: 22px; }
.result-icon {
  width: 100px;
  height: 100px;
  display: grid;
  place-items: center;
  margin: 0 auto 26px;
  border-radius: 50%;
  font-size: 52px;
  font-weight: 900;
}
.result-icon.success { background: var(--success); color: #278452; }
.result-icon.warning { background: #fff0e5; color: #be5b2d; }
.staff-result-button {
  min-height: 62px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 16px;
  background: var(--accent);
  color: white;
  font-size: 19px;
  font-weight: 850;
}
.refrigerator-content { width: min(900px, 100%); margin: 48px auto 0; }
.refrigerator-content > h1 { margin: 5px 0 4px; font-size: clamp(38px, 5.5vw, 62px); letter-spacing: -.055em; line-height: 1.05; }
.refrigerator-content > p { margin: 0 0 28px; color: var(--muted); font-size: 18px; }
.refrigerator-list { display: grid; gap: 18px; }
.refrigerator-card { padding: 24px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); }
.refrigerator-card.normal { border-color: #9fd5b5; }
.refrigerator-card.alert { border-color: #e8a393; }
.refrigerator-card-head { display: grid; grid-template-columns: 58px 1fr auto; align-items: center; gap: 16px; }
.refrigerator-symbol { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 16px; background: #e5f2f8; color: #4383a4; font-size: 29px; }
.refrigerator-card h2 { margin: 0 0 3px; font-size: 25px; }
.refrigerator-card p { margin: 0; color: var(--muted); }
.temperature-state { padding: 7px 11px; border-radius: 999px; font-size: 13px; font-weight: 850; }
.temperature-state.normal { background: var(--success); color: #278452; }
.temperature-state.alert { background: var(--error); color: #a13f2d; }
.temperature-form { display: grid; gap: 16px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.temperature-form input[type="number"] { min-height: 62px; font-size: 24px; font-weight: 750; }
.temperature-alert-fields { display: none; gap: 15px; }
.temperature-alert-fields.visible { display: grid; }
.photo-picker { min-height: 76px; display: grid; align-content: center; padding: 13px 16px; border: 2px dashed #d1c7bd; border-radius: 13px; cursor: pointer; }
.photo-picker input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.photo-picker small { color: var(--muted); font-weight: 500; }
.temperature-submit { min-height: 58px; border-radius: 14px; background: var(--accent); color: white; font-size: 18px; font-weight: 850; }
.temperature-result { display: flex; flex-wrap: wrap; align-items: center; gap: 13px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.temperature-result strong { font-size: 27px; }
.temperature-result span { color: var(--muted); }
.temperature-result small { padding: 5px 9px; border-radius: 999px; background: #eee9e3; }
.order-app-body {
  background:
    radial-gradient(circle at 85% 5%, rgba(213, 106, 54, .09), transparent 28%),
    #f4f1ed;
}
.order-app-shell { max-width: 1180px; padding-bottom: 120px; }
.order-deadline-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 25px;
  padding: 17px 20px;
  border: 1px solid #e1b18f;
  border-radius: 18px;
  background: #fff7f1;
}
.order-deadline-banner > div { display: grid; gap: 3px; }
.order-deadline-banner strong { font-size: 17px; }
.order-deadline-banner span { color: var(--muted); }
.order-deadline-banner.submitted { border-color: #a8d7ba; background: #f1faf4; }
.order-deadline-banner.locked { border-color: #d3cec8; background: #ece9e5; }
.order-state-pill {
  flex: 0 0 auto;
  padding: 7px 12px;
  border-radius: 999px;
  background: white;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}
.order-app-header {
  min-height: 78px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.order-app-header .staff-home-brand { justify-self: center; margin: 0; }
.order-live-summary {
  justify-self: end;
  display: flex;
  gap: 9px;
}
.order-live-summary > div {
  min-width: 106px;
  display: grid;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, .78);
  text-align: center;
}
.order-live-summary strong { font-size: 22px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.order-live-summary span { color: var(--muted); font-size: 11px; font-weight: 750; text-transform: uppercase; }
.order-live-summary.single > div { min-width: 124px; }
.order-categories-screen, .order-category-screen, .order-confirm-screen { width: min(980px, 100%); margin: 48px auto 0; }
.order-screen-heading {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 40px;
  margin-bottom: 30px;
}
.order-screen-heading h1, .category-screen-heading h1, .order-confirm-screen > h1 {
  margin: 5px 0 5px;
  font-size: clamp(42px, 5.8vw, 66px);
  letter-spacing: -.06em;
  line-height: 1;
}
.order-screen-heading p, .category-screen-heading p, .order-confirm-screen > p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}
.order-progress-ring {
  width: 114px;
  height: 114px;
  display: grid;
  place-content: center;
  border-radius: 50%;
  background:
    radial-gradient(circle closest-side, #f4f1ed 80%, transparent 81% 100%),
    conic-gradient(var(--accent) var(--progress), #dfd9d2 0);
  text-align: center;
}
.order-progress-ring strong { font-size: 31px; line-height: 1; }
.order-progress-ring span { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.order-category-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.order-category-card {
  min-height: 132px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto 32px;
  align-items: center;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 12px 30px rgba(49, 40, 32, .055);
  transition: transform .15s, border-color .15s, box-shadow .15s;
  -webkit-tap-highlight-color: transparent;
}
.order-category-card:active { transform: scale(.985); }
.order-category-card.completed { border-color: #db9d77; box-shadow: 0 12px 30px rgba(187, 95, 48, .09); }
.order-category-index {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #eee9e3;
  color: var(--muted);
  font-weight: 900;
}
.order-category-card.completed .order-category-index { background: #f9e3d5; color: var(--accent-dark); }
.order-category-copy h2 { margin: 0 0 4px; font-size: 23px; line-height: 1.1; letter-spacing: -.025em; }
.order-category-copy p { margin: 0; color: var(--muted); }
.order-category-total { min-width: 58px; text-align: right; }
.order-category-total strong { display: block; font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; }
.order-category-total span { color: var(--muted); font-size: 12px; font-weight: 800; }
.order-category-arrow { color: var(--accent); font-size: 27px; font-weight: 800; }
.order-main-actions {
  position: sticky;
  bottom: 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 20px;
  margin-top: 25px;
  padding: 16px 18px 16px 23px;
  border: 1px solid rgba(215, 205, 196, .9);
  border-radius: 22px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 18px 45px rgba(42, 34, 27, .12);
  backdrop-filter: blur(18px);
}
.order-main-actions span, .order-main-actions strong { display: block; }
.order-main-actions > div > span { color: var(--muted); font-size: 13px; }
.order-main-actions > div > strong { font-size: 25px; }
.order-primary-action {
  min-height: 60px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 25px;
  border-radius: 16px;
  background: var(--accent);
  color: white;
  font-size: 18px;
  font-weight: 850;
}
.order-primary-action.disabled { background: #d7d0c9; color: #817970; }
.category-app-shell { padding-bottom: 140px; }
.category-screen-heading { margin-bottom: 25px; }
.category-product-list { display: grid; gap: 17px; }
.category-product-card {
  min-height: 126px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 30px;
  padding: 22px 24px 22px 28px;
  border: 2px solid transparent;
  border-radius: 25px;
  background: white;
  box-shadow: 0 10px 30px rgba(42, 34, 27, .055);
  transition: border-color .15s, background .15s;
}
.category-product-card.selected { border-color: #dda17b; background: #fffaf6; }
.category-product-copy small { color: var(--accent-dark); font-size: 12px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.category-product-copy h2 { max-width: 570px; margin: 6px 0 0; font-size: 24px; line-height: 1.2; letter-spacing: -.025em; }
.category-counter { display: grid; grid-template-columns: 72px 86px 72px; align-items: center; gap: 10px; }
.category-step {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border: 1px solid #d8d0c8;
  border-radius: 21px;
  background: #f2eeea;
  color: var(--ink);
  font-size: 43px;
  font-weight: 650;
  line-height: 1;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.category-step.plus { border-color: var(--accent); background: var(--accent); color: white; }
.category-step:active { transform: scale(.96); }
.category-step:disabled { opacity: .55; }
.category-quantity { min-width: 86px; text-align: center; font-size: 44px; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1; }
.category-action-bar {
  position: fixed;
  z-index: 12;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  width: min(1080px, calc(100% - 36px));
  display: grid;
  grid-template-columns: 1fr .75fr 1.15fr;
  gap: 11px;
  padding: 12px;
  border: 1px solid rgba(215, 205, 196, .9);
  border-radius: 24px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 18px 50px rgba(42, 34, 27, .16);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}
.category-action {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 17px;
  border-radius: 16px;
  font-size: 17px;
  font-weight: 850;
  text-align: center;
}
.category-action.secondary { background: #f1ede9; }
.category-action.save { border: 2px solid var(--accent); color: var(--accent-dark); }
.category-action.primary { background: var(--accent); color: white; }
.order-confirm-screen { width: min(820px, 100%); }
.order-confirm-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 28px 0;
}
.order-confirm-meta > div {
  display: grid;
  gap: 5px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: white;
}
.order-confirm-meta span, .order-success-details span { color: var(--muted); font-size: 12px; font-weight: 750; text-transform: uppercase; }
.order-confirm-meta strong { font-size: 19px; }
.order-confirm-list { display: grid; gap: 15px; }
.order-confirm-list section { padding: 21px 23px; border: 1px solid var(--line); border-radius: 21px; background: white; }
.order-confirm-category, .order-confirm-product { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.order-confirm-category { padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.order-confirm-category h2 { margin: 0; font-size: 23px; }
.order-confirm-category > strong { color: var(--accent-dark); font-size: 21px; }
.order-confirm-product { padding-top: 11px; color: var(--muted); }
.order-confirm-product strong { color: var(--ink); font-size: 18px; }
.order-submit-panel {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 18px;
  margin-top: 22px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: white;
  box-shadow: var(--shadow);
}
.order-submit-panel a { padding: 0 12px; color: var(--muted); font-weight: 800; }
.order-submit-panel button {
  min-height: 66px;
  border-radius: 16px;
  background: var(--accent);
  color: white;
  font-size: 19px;
  font-weight: 900;
}
.order-success-body {
  background:
    radial-gradient(circle at 50% 18%, rgba(65, 160, 104, .14), transparent 30%),
    #f4f1ed;
}
.order-success-card { width: min(680px, 100%); text-align: center; }
.order-success-mark {
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  margin: 0 auto 25px;
  border-radius: 34px;
  background: #2f9a61;
  color: white;
  box-shadow: 0 18px 45px rgba(47, 154, 97, .22);
  font-size: 60px;
  font-weight: 900;
}
.order-success-card h1 { margin: 7px 0; font-size: clamp(44px, 7vw, 68px); letter-spacing: -.06em; line-height: 1; }
.order-success-card > p { margin: 0 0 28px; color: var(--muted); font-size: 20px; }
.order-success-details { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 25px; text-align: left; }
.order-success-details > div { display: grid; gap: 5px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: white; }
.order-success-details strong { font-size: 21px; }
.order-success-button { min-height: 64px; display: flex; align-items: center; justify-content: center; border-radius: 17px; background: var(--accent); color: white; font-size: 19px; font-weight: 900; }
.order-task-icon { background: #f7e7dc; color: var(--accent-dark); }
.order-admin-filters { grid-template-columns: minmax(220px, 360px) auto; }
.order-admin-status { display: inline-flex; padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 850; }
.order-admin-status.submitted { background: var(--success); color: #278452; }
.order-admin-status.locked { background: #ece9e5; color: #69625b; }
.order-admin-status.pending { background: #eee9e3; color: #6d655e; }
.table-link { color: var(--accent-dark); font-weight: 800; white-space: nowrap; }
.order-detail-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.metric .metric-date { font-size: 22px; }
.export-control-panel { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.bakery-head { align-items: flex-end; gap: 24px; }
.owner-dashboard-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.export-date-form { display: flex; align-items: end; gap: 12px; }
.export-date-form input { min-width: 210px; }
.export-date-form button { min-height: 46px; }
.export-download-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.export-button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; padding: 10px 18px; border-radius: 13px; font-weight: 850; }
.export-button.production { background: #9f3f35; color: white; }
.export-button.distribution { background: #3b638e; color: white; }
.export-button.excel { box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .14); }
.export-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.bakery-status-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; margin-bottom: 18px; }
.bakery-status-card.success { border-color: #acd9ba; background: #fafffb; }
.bakery-status-card.warning { border-color: #f0d68d; background: #fffdf4; }
.bakery-points-grid { display: grid; gap: 10px; }
.bakery-point-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid #eadfd6;
  border-radius: 16px;
  background: #fff;
}
.bakery-point-card.ready { border-color: #acd9ba; background: #f8fdf9; }
.bakery-point-card.missing { border-color: #f1d9ad; background: #fffaf0; }
.bakery-point-card strong,
.bakery-point-card small { display: block; }
.bakery-point-card small { margin-top: 4px; color: #7e736a; }
.bakery-point-actions { display: flex; gap: 10px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.bakery-doc-list { display: grid; gap: 10px; }
.bakery-doc-card {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid #eadfd6;
  border-radius: 16px;
  background: #fff;
  color: inherit;
  text-decoration: none;
}
.bakery-doc-card span { color: #7e736a; }
.bakery-doc-card.accent { border-color: #d56a36; background: #fff7f1; }
.export-document-guide { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.export-document-guide article { padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: var(--shadow); }
.export-document-guide h2 { margin: 10px 0 4px; font-size: 21px; }
.export-document-guide p { margin: 0; color: var(--muted); }
.export-doc-tag { display: inline-flex; padding: 5px 9px; border-radius: 999px; color: white; font-size: 11px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.export-doc-tag.production { background: #9f3f35; }
.export-doc-tag.distribution { background: #3b638e; }
.export-preview-head { padding: 21px 21px 0; }
.export-total-cell { color: var(--accent-dark); font-weight: 900; }
.export-preview tfoot th { background: var(--accent); color: white; }
.export-empty { display: flex; align-items: center; gap: 18px; }
.export-empty h2 { margin: 0 0 4px; }
.export-empty p { margin: 0; color: var(--muted); }
.settings-card-list { display: grid; gap: 14px; margin-top: 18px; }
.settings-entity-card { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: #faf8f5; }
.permission-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; margin: 14px 0; }
.permission-grid label { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.permission-grid input, .catalog-check input { width: auto; }
.settings-logo { margin-top: 16px; }
.settings-block + .settings-block { margin-top: 18px; }
.users-admin-list { margin-top: 18px; }
@media (max-width: 1050px) {
  .app-shell { grid-template-columns: 220px 1fr; }
  .content-inner { padding: 30px 24px 70px; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .split-layout { grid-template-columns: 1fr; }
  .sticky-form { position: static; }
}
@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { display: none; }
  .mobile-header { height: 68px; display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: var(--sidebar); color: white; }
  .mobile-header .sidebar-brand { margin: 0; }
  .content-inner { padding: 24px 14px 100px; }
  .mobile-nav { position: fixed; z-index: 10; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); padding: 7px max(8px, env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); background: rgba(25, 23, 20, .97); }
  .mobile-nav a { display: grid; place-items: center; gap: 2px; min-width: 0; color: #aaa39b; }
  .mobile-nav a.active { color: white; }
  .mobile-nav span { font-size: 21px; }
  .mobile-nav small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
  .page-head { align-items: flex-start; }
  .page-head .button { display: none; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .metric { padding: 15px; }
  .metric strong { font-size: 28px; }
  .form-grid { grid-template-columns: 1fr; }
  .full { grid-column: auto; }
  .panel { padding: 17px; }
  .table-panel { padding: 0; }
  .login-shell { grid-template-columns: 1fr; gap: 28px; }
  .login-brand { display: block; }
  .login-brand .logo-mark { margin-bottom: 18px; }
  .inline-form { flex-direction: column; }
  .excel-format { grid-template-columns: 1fr 1fr; }
  .catalog-layout { grid-template-columns: 1fr; }
  .catalog-create { position: static; }
  .catalog-filters { grid-template-columns: 1fr; }
  .catalog-table .table-wrap { overflow: visible; }
  .catalog-products-table { min-width: 0; table-layout: auto; }
  .catalog-products-table colgroup, .catalog-products-table thead { display: none; }
  .catalog-products-table, .catalog-products-table tbody, .catalog-products-table tr, .catalog-products-table td { display: block; width: 100%; }
  .catalog-products-table tr { margin: 0 0 12px; padding: 15px; border: 1px solid var(--line); border-radius: 8px; background: white; }
  .catalog-products-table td { display: grid; grid-template-columns: 92px minmax(0,1fr); gap: 10px; padding: 7px 0; border: 0; text-align: left; }
  .catalog-products-table td::before { content: attr(data-label); color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
  .catalog-products-table td.catalog-actions { display: flex; justify-content: stretch; padding-top: 12px; border-top: 1px solid var(--line); }
  .catalog-products-table td.catalog-actions::before { display: none; }
  .catalog-actions .button, .catalog-actions form { flex: 1; }
  .catalog-actions form .button { width: 100%; }
  .staff-login-shell { grid-template-columns: 1fr; gap: 28px; }
  .staff-brand { justify-content: center; text-align: center; }
  .staff-brand p { display: none; }
  .staff-logo { width: 62px; height: 62px; border-radius: 17px; font-size: 18px; }
  .staff-brand h1 { font-size: 48px; }
  .staff-pin-card { width: min(430px, 100%); margin: 0 auto; padding: 22px; }
  .pin-key { min-height: 68px; }
  .staff-work-shell { padding-left: 16px; padding-right: 16px; }
  .staff-today { margin-top: 36px; }
  .staff-task-card { grid-template-columns: 70px 1fr; gap: 18px; padding: 20px; }
  .task-icon { width: 66px; height: 66px; border-radius: 18px; font-size: 33px; }
  .staff-start-button { grid-column: 1 / -1; min-height: 60px; }
  .delivery-header { grid-template-columns: auto 1fr; }
  .delivery-brand { justify-self: end; }
  .delivery-context { grid-column: 1 / -1; justify-content: space-between; padding-top: 13px; border-top: 1px solid var(--line); text-align: left; }
  .delivery-context > div:last-child { text-align: right; }
  .delivery-content, .problem-content { margin-top: 34px; }
  .delivery-manifest { padding: 20px; }
  .delivery-manifest-head .task-icon { flex: 0 0 auto; }
  .delivery-list > div { font-size: 18px; }
  .delivery-actions { grid-template-columns: 1fr; }
  .delivery-action { min-height: 66px; }
  .problem-form { padding: 20px; }
  .refrigerator-card { padding: 18px; }
  .refrigerator-card-head { grid-template-columns: 50px 1fr; }
  .refrigerator-symbol { width: 50px; height: 50px; }
  .temperature-state { grid-column: 1 / -1; width: max-content; }
  .order-app-shell { padding-left: 14px; padding-right: 14px; }
  .order-deadline-banner { align-items: flex-start; }
  .order-app-header { grid-template-columns: auto 1fr; }
  .order-app-header .staff-home-brand { justify-self: end; }
  .order-live-summary { grid-column: 1 / -1; width: 100%; justify-self: stretch; }
  .order-live-summary > div { flex: 1; }
  .order-categories-screen, .order-category-screen, .order-confirm-screen { margin-top: 32px; }
  .order-screen-heading { grid-template-columns: 1fr auto; gap: 18px; }
  .order-progress-ring { width: 88px; height: 88px; }
  .order-progress-ring strong { font-size: 25px; }
  .order-category-grid { grid-template-columns: 1fr; }
  .order-category-card { min-height: 112px; grid-template-columns: 46px minmax(0, 1fr) auto 25px; gap: 13px; padding: 17px; }
  .order-category-index { width: 46px; height: 46px; border-radius: 14px; }
  .order-category-copy h2 { font-size: 21px; }
  .order-category-total strong { font-size: 27px; }
  .order-main-actions { bottom: max(12px, env(safe-area-inset-bottom)); }
  .category-product-card { min-height: 164px; grid-template-columns: 1fr; gap: 18px; padding: 21px; }
  .category-product-copy h2 { font-size: 23px; }
  .category-counter { grid-template-columns: 1fr 92px 1fr; }
  .category-step { width: 100%; height: 76px; }
  .category-quantity { min-width: 92px; font-size: 48px; }
  .category-action-bar { width: calc(100% - 20px); grid-template-columns: 1fr 1fr; bottom: max(8px, env(safe-area-inset-bottom)); }
  .category-action { min-height: 58px; font-size: 15px; }
  .category-action.primary { grid-column: 1 / -1; grid-row: 1; }
  .order-confirm-meta { grid-template-columns: 1fr 1fr; }
  .order-submit-panel { grid-template-columns: 1fr; text-align: center; }
  .order-submit-panel button { grid-row: 1; }
  .order-success-details { grid-template-columns: 1fr 1fr; }
  .order-detail-metrics { grid-template-columns: 1fr 1fr; }
  .export-control-panel { align-items: stretch; flex-direction: column; }
  .export-date-form, .export-download-actions { width: 100%; }
  .export-date-form label { flex: 1; }
  .export-download-actions > * { flex: 1; }
  .export-metrics { grid-template-columns: 1fr 1fr; }
  .bakery-status-grid { grid-template-columns: 1fr; }
  .export-document-guide { grid-template-columns: 1fr; }
  .bakery-point-card { align-items: stretch; flex-direction: column; }
  .bakery-point-actions { justify-content: flex-start; }
}
@media (max-width: 480px) {
  .order-screen-heading { grid-template-columns: 1fr; }
  .order-progress-ring { display: none; }
  .order-category-card { grid-template-columns: 42px minmax(0, 1fr) auto; }
  .order-category-arrow { display: none; }
  .order-main-actions { grid-template-columns: 1fr; }
  .order-primary-action { width: 100%; }
  .order-confirm-meta, .order-success-details { grid-template-columns: 1fr; }
  .order-deadline-banner { display: grid; }
  .order-state-pill { width: max-content; }
}
.staff-order-task-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.staff-order-task-list a {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 8px 14px;
  border: 1px solid #eadfd6;
  border-radius: 14px;
  color: inherit;
  text-decoration: none;
  background: #fffaf6;
}
.staff-order-task-list a.completed {
  border-color: #b9dfc4;
  background: #f2fbf4;
}
.staff-order-task-list a.locked { opacity: .65; }
.staff-order-task-list a > span {
  color: #d56a36;
  font-size: 24px;
  font-weight: 800;
}
.staff-order-task-list a.completed > span { color: #278a48; }
.staff-order-task-list small { color: #766b62; }
.calendar-readiness,
.calendar-rules-panel { margin-bottom: 24px; }
.calendar-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0 8px;
}
.calendar-status-head span { color: #766b62; }
.calendar-status-head h2 { margin: 4px 0 0; }
.calendar-point-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  margin-top: 20px;
}
.calendar-point-grid article {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid #e8ddd4;
  border-radius: 16px;
}
.calendar-point-grid article > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-weight: 900;
}
.calendar-point-grid .ready > span {
  color: #267842;
  background: #dcf4e3;
}
.calendar-point-grid .missing > span {
  color: #a33b31;
  background: #fbe3df;
}
.calendar-point-grid small {
  display: block;
  margin-top: 4px;
  color: #766b62;
}
.calendar-date-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
.calendar-date-links a {
  padding: 9px 13px;
  border: 1px solid #dfd3ca;
  border-radius: 10px;
  color: #4b423b;
  text-decoration: none;
  background: #fff;
}
.calendar-date-links a.active {
  color: #fff;
  border-color: #d56a36;
  background: #d56a36;
}
.calendar-rule-list { display: grid; gap: 10px; }
.calendar-rule-row {
  display: grid;
  grid-template-columns: 1.3fr 1.3fr .7fr .7fr .7fr auto;
  align-items: end;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e8ddd4;
  border-radius: 14px;
}
.calendar-rule-row label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: #766b62;
}
.calendar-rule-row .check {
  display: flex;
  align-items: center;
  min-height: 42px;
}
.calendar-rule-new {
  margin-top: 18px;
  background: #fff8f2;
}
.export-calendar-links { margin: 14px 0 4px; }
@media (max-width: 900px) {
  .calendar-rule-row { grid-template-columns: 1fr 1fr; }
}
.leftovers-shell { max-width: 980px; }
.leftovers-screen {
  padding: clamp(24px, 5vw, 54px);
}
.leftovers-screen > h1 {
  margin: 8px 0;
  font-size: clamp(34px, 6vw, 58px);
}
.leftovers-screen > p {
  max-width: 680px;
  color: #766b62;
  font-size: 18px;
}
.leftovers-date {
  padding: 10px 14px;
  border-radius: 12px;
  color: #6e6259;
  background: #f4eee9;
  font-weight: 700;
}
.leftovers-form { margin-top: 28px; }
.leftovers-list {
  display: grid;
  gap: 14px;
}
.leftovers-product {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  align-items: center;
  gap: 24px;
  padding: 22px 24px;
  border: 1px solid #eadfd6;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(49, 39, 31, .05);
}
.leftovers-product small {
  color: #8a7d73;
  font-weight: 700;
}
.leftovers-product h2 {
  margin: 6px 0;
  font-size: 22px;
}
.leftovers-sold {
  color: #267842;
  font-weight: 800;
}
.leftovers-product label {
  display: grid;
  gap: 7px;
  color: #766b62;
  font-size: 13px;
  font-weight: 700;
}
.leftovers-product input {
  width: 100%;
  min-height: 70px;
  border: 2px solid #dfd3ca;
  border-radius: 16px;
  text-align: center;
  font-size: 34px;
  font-weight: 900;
}
.leftovers-product input:focus {
  border-color: #d56a36;
  outline: 3px solid rgba(213, 106, 54, .15);
}
.leftovers-submit {
  width: 100%;
  min-height: 66px;
  margin-top: 22px;
  border: 0;
  border-radius: 17px;
  color: #fff;
  background: #d56a36;
  font-size: 20px;
  font-weight: 900;
}
.analytics-filters {
  display: grid;
  grid-template-columns: 1.2fr 1.5fr 1fr 1fr auto auto;
  align-items: end;
  gap: 12px;
}
.analytics-filters label {
  display: grid;
  gap: 7px;
  color: #766b62;
  font-size: 13px;
  font-weight: 700;
}
.analytics-filters .button { text-align: center; }
@media (max-width: 900px) {
  .analytics-filters { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .leftovers-product { grid-template-columns: 1fr; }
  .leftovers-product label { width: 100%; }
  .analytics-filters { grid-template-columns: 1fr; }
}
.cash-staff-shell { max-width: 1080px; }
.cash-staff-screen { padding: clamp(24px, 5vw, 54px); }
.cash-staff-screen > h1 {
  margin: 8px 0 18px;
  font-size: clamp(36px, 6vw, 60px);
}
.cash-save-state {
  padding: 10px 14px;
  border-radius: 12px;
  color: #6e6259;
  background: #f4eee9;
  font-size: 13px;
  font-weight: 800;
}
.cash-context {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}
.cash-context div {
  padding: 14px;
  border: 1px solid #eadfd6;
  border-radius: 14px;
  background: #fff;
}
.cash-context span,
.cash-context strong { display: block; }
.cash-context span { color: #81756b; font-size: 12px; }
.cash-context strong { margin-top: 4px; }
.cash-money-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.cash-money-grid > label,
.cash-text-grid > label {
  display: grid;
  gap: 8px;
  color: #655a51;
  font-weight: 800;
}
.money-input { position: relative; }
.money-input input {
  width: 100%;
  min-height: 68px;
  padding: 10px 42px 10px 16px;
  border: 2px solid #dfd3ca;
  border-radius: 16px;
  font-size: 27px;
  font-weight: 900;
}
.money-input span {
  position: absolute;
  right: 16px;
  top: 50%;
  color: #9a8b80;
  transform: translateY(-50%);
  font-weight: 900;
}
.cash-text-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}
.cash-text-grid textarea,
.cash-admin-edit textarea {
  width: 100%;
  resize: vertical;
  border: 2px solid #dfd3ca;
  border-radius: 14px;
}
.cash-money-grid input:focus,
.cash-text-grid textarea:focus {
  border-color: #d56a36;
  outline: 3px solid rgba(213,106,54,.14);
}
.cash-inline-error {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  color: #96382e;
  background: #fbe4e0;
}
.cash-complete-zone { margin-top: 22px; }
.cash-complete-button {
  width: 100%;
  min-height: 66px;
  border: 0;
  border-radius: 17px;
  color: #fff;
  background: #25211d;
  font-size: 19px;
  font-weight: 900;
}
.cash-confirmation {
  padding: 20px;
  border: 2px solid #d56a36;
  border-radius: 17px;
  background: #fff7f1;
}
.cash-confirmation p { color: #766b62; }
.cash-confirmation > div {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.cash-photo-section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid #e6dbd2;
}
.cash-photo-section h2 { margin-bottom: 4px; }
.cash-photo-section p { margin-top: 0; color: #766b62; }
.cash-photo-upload {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
}
.cash-photo-upload input {
  flex: 1;
  min-height: 48px;
  padding: 10px;
  border: 1px dashed #cfc1b6;
  border-radius: 12px;
}
.cash-photo-list,
.cash-admin-photos { display: grid; gap: 9px; }
.cash-photo-list > div,
.cash-admin-photos > a {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #e5d9cf;
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
}
.cash-photo-list small,
.cash-admin-photos small { color: #81756b; }
.cash-admin-filters {
  display: grid;
  grid-template-columns: repeat(5, 1fr) auto auto;
  align-items: end;
  gap: 10px;
}
.cash-admin-filters label {
  display: grid;
  gap: 6px;
  color: #766b62;
  font-size: 12px;
  font-weight: 700;
}
.cash-status {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}
.cash-status.draft { color: #8b5c18; background: #fff0c7; }
.cash-status.completed { color: #267842; background: #dcf4e3; }
.cash-status.closed { color: #5e5751; background: #e8e4e0; }
.table-subline { display: block; margin-top: 3px; color: #8b7e74; }
.cash-detail-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.cash-detail-status small { color: #766b62; }
.cash-admin-edit {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.cash-admin-edit label {
  display: grid;
  gap: 6px;
  color: #766b62;
  font-size: 13px;
  font-weight: 700;
}
.cash-admin-edit .wide { grid-column: 1 / -1; }
.cash-live-totals,
.cash-summary-grid,
.cash-detail-meta {
  display: grid;
  gap: 12px;
}
.cash-live-totals {
  grid-template-columns: repeat(5, 1fr);
  margin-top: 16px;
}
.cash-live-totals > div,
.cash-summary-card,
.cash-detail-meta > div {
  padding: 14px;
  border: 1px solid #eadfd6;
  border-radius: 14px;
  background: #fff;
}
.cash-live-totals span,
.cash-summary-card span,
.cash-detail-meta span {
  display: block;
  color: #81756b;
  font-size: 12px;
  font-weight: 800;
}
.cash-live-totals strong,
.cash-summary-card strong,
.cash-detail-meta strong {
  display: block;
  margin-top: 5px;
  color: #302c27;
  font-size: 19px;
  font-weight: 950;
}
.cash-live-totals .main,
.cash-summary-card.warning { border-color: #d56a36; background: #fff7f1; }
.cash-summary-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 18px;
}
.cash-export-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 14px;
}
.cash-turnover-export {
  border-color: color-mix(in srgb, var(--color-accent) 45%, var(--color-border));
}
.cash-turnover-export-form { display: grid; gap: 18px; }
.cash-export-period {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 260px));
  gap: 12px;
}
.cash-export-period label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 800;
}
.cash-export-point-head,
.cash-export-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.cash-export-point-head > div:first-child,
.cash-export-submit > div { display: grid; gap: 4px; }
.cash-export-point-head small,
.cash-export-submit small { color: var(--color-text-muted); }
.cash-export-select-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cash-export-points {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.cash-export-point {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--color-border);
  border-radius: 7px;
  background: var(--color-card);
  color: var(--color-text);
  cursor: pointer;
}
.cash-export-point:hover { border-color: var(--color-accent); }
.cash-export-point:has(input:checked),
.cash-export-point.is-selected {
  border-color: var(--color-accent);
  background: color-mix(in srgb, var(--color-accent) 12%, var(--color-card));
}
.cash-export-point input { flex: 0 0 auto; }
.cash-export-point span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 800;
}
.cash-export-selection-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 7px;
  background: var(--color-bg-soft);
}
.cash-export-selection-status small { color: var(--color-text-muted); }
.cash-export-submit {
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}
@media (max-width: 980px) {
  .cash-export-points { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .cash-export-period,
  .cash-export-points { grid-template-columns: 1fr; }
  .cash-export-point-head,
  .cash-export-submit { align-items: stretch; flex-direction: column; }
  .cash-export-selection-status { align-items: flex-start; flex-direction: column; }
  .cash-export-submit .button { width: 100%; }
}
.cash-row-green { background: #f1fbf3; }
.cash-row-yellow { background: #fff7d9; }
.cash-row-red { background: #fdebe8; }
.cash-discipline-table .cash-row-green { background: rgba(43, 125, 78, .14); color: var(--color-text); }
.cash-discipline-table .cash-row-yellow { background: rgba(214, 150, 54, .16); color: var(--color-text); }
.cash-discipline-table .cash-row-red { background: rgba(190, 76, 60, .16); color: var(--color-text); }
.cash-discipline-table .cash-row-green:hover,
.cash-discipline-table .cash-row-yellow:hover,
.cash-discipline-table .cash-row-red:hover { background: var(--color-card-hover); }
.cash-warning-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 180px;
}
.cash-warning-list span,
.cash-ok {
  display: inline-flex;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}
.cash-warning-list .red { color: #96382e; background: #ffd9d3; }
.cash-warning-list .yellow { color: #8b5c18; background: #fff0c7; }
.cash-ok { color: #267842; background: #dcf4e3; }
.cash-detail-meta {
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 18px;
}
.cash-photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}
.cash-photo-gallery a {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #eadfd6;
  border-radius: 14px;
  color: inherit;
  text-decoration: none;
  background: #fff;
}
.cash-photo-gallery img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 10px;
  background: #f4eee9;
}
.cash-photo-gallery small { color: #81756b; }
.ai-period-form {
  grid-template-columns: 1fr 1fr auto auto;
}
.ai-summary-grid { margin-bottom: 18px; }
.ai-grid {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}
.ai-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ai-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ai-grid .wide { grid-column: 1 / -1; }
.ai-card-list {
  display: grid;
  gap: 10px;
}
.ai-recommendation,
.ai-rank-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #eadfd6;
  border-radius: 14px;
  background: #fff;
}
.ai-recommendation small,
.ai-rank-row small {
  display: block;
  margin-top: 3px;
  color: #81756b;
}
.ai-badge {
  padding: 6px 10px;
  border-radius: 999px;
  color: #8b3e1f;
  background: #f7e7dc;
  font-weight: 900;
  font-size: 12px;
}
.ai-compact-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 20px;
}
.ai-compact-list li {
  padding: 7px 0;
  border-bottom: 1px solid #eee4dc;
}
.ai-compact-list li span {
  display: inline-block;
  max-width: 74%;
}
.ai-compact-list b {
  float: right;
  color: #d56a36;
}
.ai-chart-panel {
  min-height: 360px;
}
.ai-chart-panel canvas {
  width: 100% !important;
  height: 290px !important;
}
.ai-context-box {
  display: grid;
  gap: 10px;
}
.ai-context-box p {
  margin: 0;
  padding: 12px 14px;
  border-left: 4px solid #d56a36;
  border-radius: 10px;
  background: #fff7f1;
  color: #4b433c;
}
.ai-forecast-block {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #eadfd6;
  border-radius: 16px;
  background: #fff;
}
.ai-forecast-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.ai-forecast-table table td small {
  display: block;
  margin-top: 4px;
  color: #81756b;
}
.ai-status {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}
.ai-status.ok {
  color: #267842;
  background: #e8f7ed;
}
.ai-status.add {
  color: #96382e;
  background: #fdebe8;
}
.ai-status.reduce {
  color: #8b5c18;
  background: #fff7d9;
}
.metric-ok { color: #267842; font-weight: 900; }
.metric-bad { color: #96382e; font-weight: 900; }
.metric-warn { color: #8b5c18; font-weight: 900; }
.ai-schedule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}
.ai-schedule-grid div {
  padding: 13px 15px;
  border: 1px solid #eadfd6;
  border-radius: 14px;
  background: #fff;
}
.ai-schedule-grid strong,
.ai-schedule-grid span { display: block; }
.ai-schedule-grid span {
  margin-top: 4px;
  color: #81756b;
  font-size: 13px;
}
.ai-director-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.ai-director-hero {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.ai-director-hero > div {
  padding: 18px;
  border: 1px solid #eadfd6;
  border-radius: 18px;
  background: #fff;
}
.ai-director-hero span,
.ai-director-hero small {
  display: block;
  color: #81756b;
  font-size: 12px;
  font-weight: 800;
}
.ai-director-hero strong {
  display: block;
  margin-top: 5px;
  font-size: 28px;
  font-weight: 950;
}
.ai-director-hero .critical { background: #fdebe8; border-color: #f1b7ad; }
.ai-director-hero .warning { background: #fff7d9; border-color: #f0d68d; }
.ai-director-hero .success { background: #e8f7ed; border-color: #acd9ba; }
.ai-director-grid {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}
.ai-director-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.director-event-list {
  display: grid;
  gap: 10px;
}
.director-event-list.compact { max-height: 520px; overflow: auto; padding-right: 4px; }
.director-event {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 15px;
  border: 1px solid #eadfd6;
  background: #fff;
}
.director-event span {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 950;
}
.director-event small { color: #766b62; }
.director-event.critical { border-color: #f1b7ad; background: #fdebe8; }
.director-event.critical span { color: #96382e; background: #ffd9d3; }
.director-event.warning { border-color: #f0d68d; background: #fff7d9; }
.director-event.warning span { color: #8b5c18; background: #fff0c7; }
.director-event.info span { color: #325a8a; background: #e3eefb; }
.director-event.success { border-color: #acd9ba; background: #e8f7ed; }
.director-event.success span { color: #267842; background: #dcf4e3; }
.director-summary {
  display: grid;
  gap: 10px;
}
.director-summary p {
  margin: 0;
  padding: 14px 16px;
  border-left: 4px solid #d56a36;
  border-radius: 12px;
  background: #fff7f1;
}
.director-rating-list {
  display: grid;
  gap: 12px;
}
.director-rating {
  display: grid;
  grid-template-columns: 1fr 150px 70px;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid #eadfd6;
  border-radius: 14px;
  background: #fff;
}
.director-rating div {
  height: 10px;
  border-radius: 999px;
  background: #efe6df;
  overflow: hidden;
}
.director-rating div span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #d56a36;
}
.director-rating small {
  grid-column: 1 / -1;
  color: #81756b;
}
.director-task-pill,
.director-employee {
  display: inline-flex;
  margin: 2px;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}
.director-task-pill.done { color: #267842; background: #dcf4e3; }
.director-task-pill.todo { color: #96382e; background: #ffd9d3; }
.director-employee { color: #4b433c; background: #f4eee9; }
.director-employee.inactive { opacity: .55; }
.director-history {
  display: grid;
  gap: 9px;
}
.director-history a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #eadfd6;
  border-radius: 13px;
  color: inherit;
  text-decoration: none;
  background: #fff;
}
.director-history span { color: #81756b; }
.ai-summary-grid .cash-summary-card strong {
  font-size: 20px;
  line-height: 1.2;
}
.ai-infra-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.cash-summary-card.success { border-color: #acd9ba; background: #e8f7ed; }
.ai-infra-benchmark {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 14px;
}
.ai-infra-benchmark.ok { background: #e8f7ed; border: 1px solid #acd9ba; }
.ai-infra-benchmark.bad { background: #fdebe8; border: 1px solid #f1b7ad; }
.ai-infra-benchmark span { color: #81756b; font-weight: 900; }
.ai-path-list {
  display: grid;
  gap: 9px;
}
.ai-path-list code {
  display: block;
  padding: 10px 12px;
  border: 1px solid #eadfd6;
  border-radius: 10px;
  background: #fff7f1;
  color: #4b433c;
}
@media (max-width: 900px) {
  .cash-context { grid-template-columns: repeat(2, 1fr); }
  .cash-live-totals,
  .cash-summary-grid,
  .cash-detail-meta { grid-template-columns: repeat(2, 1fr); }
  .cash-money-grid,
  .cash-admin-edit { grid-template-columns: repeat(2, 1fr); }
  .cash-admin-filters { grid-template-columns: repeat(2, 1fr); }
  .ai-grid.two,
  .ai-grid.four { grid-template-columns: 1fr; }
  .ai-period-form { grid-template-columns: 1fr 1fr; }
  .ai-director-hero,
  .ai-director-grid.two { grid-template-columns: 1fr; }
  .ai-infra-grid { grid-template-columns: repeat(2, 1fr); }
  .director-rating { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .cash-context,
  .cash-live-totals,
  .cash-summary-grid,
  .cash-detail-meta,
  .cash-money-grid,
  .cash-text-grid,
  .cash-admin-edit,
  .cash-admin-filters { grid-template-columns: 1fr; }
  .cash-photo-upload,
  .cash-confirmation > div { align-items: stretch; flex-direction: column; }
  .cash-photo-list > div,
  .cash-admin-photos > a { grid-template-columns: 30px 1fr; }
  .cash-photo-list small,
  .cash-admin-photos small { grid-column: 2; }
  .ai-period-form { grid-template-columns: 1fr; }
  .ai-recommendation,
  .ai-rank-row { grid-template-columns: 1fr; }
  .ai-infra-grid { grid-template-columns: 1fr; }
}
.memory-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.memory-actions input,
.memory-search input {
  min-height: 44px;
}

.memory-stats {
  margin: 18px 0;
}

.memory-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(520px, 1.5fr);
  gap: 18px;
  align-items: start;
}

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

.memory-event {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(38, 32, 26, 0.10);
  border-radius: 18px;
  background: #fffaf2;
}

.memory-event p {
  margin: 6px 0;
  color: #5f5448;
}

.memory-event small {
  color: #8b7b68;
}

.memory-event > span {
  align-self: flex-start;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  text-transform: uppercase;
  background: rgba(38, 32, 26, 0.08);
}

.memory-event.critical {
  border-color: rgba(185, 28, 28, 0.30);
  background: #fff1f1;
}

.memory-event.warning {
  border-color: rgba(202, 138, 4, 0.32);
  background: #fff8e6;
}

.memory-event.success {
  border-color: rgba(22, 163, 74, 0.25);
  background: #effbf3;
}

.memory-day-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.memory-day-summary div {
  padding: 14px;
  border-radius: 18px;
  background: #f6efe4;
}

.memory-day-summary span {
  display: block;
  color: #7b6b5c;
  font-size: 13px;
}

.memory-day-summary strong {
  display: block;
  margin-top: 5px;
  font-size: 26px;
}

.compact-table th,
.compact-table td {
  white-space: nowrap;
}

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

@media (max-width: 720px) {
  .memory-day-summary {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* ==========================
   GoodBuns ERP v1.0 Polish
   Unified responsive/product layer
   ========================== */
:root {
  --surface-soft: var(--color-bg-soft);
  --surface-warm: #27211c;
  --line-strong: var(--color-border-strong);
  --warning: var(--color-warning-soft);
  --danger: var(--color-danger-soft);
  --shadow-lift: var(--shadow-elevated);
}
html { overflow-x: hidden; text-size-adjust: 100%; -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; font-feature-settings: "kern" 1; }
a, button, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; box-shadow: var(--focus); }
img, svg, canvas { max-width: 100%; }
.content { width: 100%; overflow: hidden; }
.content-inner { width: min(100%, 1560px); padding-left: clamp(22px, 2.6vw, 44px); padding-right: clamp(22px, 2.6vw, 44px); }
.page-head { flex-wrap: wrap; } .page-head > div, .section-head > div { min-width: 0; }
.page-head h1, .section-head h2, .panel h2, .metric strong { overflow-wrap: anywhere; }
.section-head { flex-wrap: wrap; }
.panel, .metric, .cash-summary-card, .cash-detail-meta > div, .cash-live-totals > div, .calendar-point-grid article,
.ai-recommendation, .ai-rank-row, .director-event, .business-memory-event, .business-memory-day-card,
.leftovers-product, .refrigerator-card, .delivery-manifest, .problem-form, .order-category-card, .category-product-card,
.order-submit-panel, .cash-photo-gallery a { box-shadow: var(--shadow-soft); }
.panel:hover, .metric:hover, .order-category-card:hover, .ai-recommendation:hover, .director-event:hover { box-shadow: var(--shadow-lift); }
.primary, .secondary, .button, .staff-start-button, .staff-submit, .delivery-action, .category-action, .order-primary-action,
.cash-complete-button, .leftovers-submit { transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease, border-color .15s ease; }
.primary:active, .secondary:active, .button:active, .staff-start-button:active, .delivery-action:active, .category-action:active, .order-primary-action:active { transform: translateY(1px) scale(.99); }
.secondary, .button.secondary { border: 1px solid var(--line-strong); background: var(--color-bg-soft); color: var(--ink); }
.gb-badge, .status-pill, .cash-status, .ai-badge, .order-state-pill { display: inline-flex; align-items: center; width: max-content; max-width: 100%; gap: 6px; white-space: nowrap; }
.gb-badge { padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 900; background: #eee7df; color: #5b5048; }
.gb-badge.success { background: #dcf4e3; color: #267842; } .gb-badge.warning { background: #fff0c7; color: #8b5c18; } .gb-badge.danger { background: #ffd9d3; color: #96382e; }
.table-panel { max-width: 100%; } .table-wrap { width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-gutter: stable; }
table { table-layout: auto; } th { white-space: nowrap; } td { vertical-align: top; } td, th { overflow-wrap: anywhere; }
.table-link { white-space: normal; } .compact-table { min-width: 640px; } .compact-table th, .compact-table td { padding: 10px 12px; } .table-subline { overflow-wrap: anywhere; }
.loss-control-table-wrap { overflow-x: auto; }
.loss-control-attention-table { min-width: 1420px; table-layout: fixed; }
.loss-control-detail-table { min-width: 1580px; table-layout: fixed; }
.loss-control-zero-table { min-width: 1480px; table-layout: fixed; }
.loss-control-attention-table th,
.loss-control-attention-table td,
.loss-control-detail-table th,
.loss-control-detail-table td,
.loss-control-zero-table th,
.loss-control-zero-table td { padding: 13px 12px; overflow-wrap: normal; word-break: normal; }
.loss-control-attention-table th:nth-child(1),
.loss-control-attention-table td:nth-child(1),
.loss-control-detail-table th:nth-child(1),
.loss-control-detail-table td:nth-child(1) { width: 104px; }
.loss-control-attention-table th:nth-child(2),
.loss-control-attention-table td:nth-child(2),
.loss-control-detail-table th:nth-child(2),
.loss-control-detail-table td:nth-child(2) { width: 70px; }
.loss-control-attention-table th:nth-child(3),
.loss-control-attention-table td:nth-child(3) { width: 330px; }
.loss-control-detail-table th:nth-child(3),
.loss-control-detail-table td:nth-child(3) { width: 300px; }
.loss-control-attention-table th:nth-child(n+4),
.loss-control-attention-table td:nth-child(n+4),
.loss-control-detail-table th:nth-child(n+4),
.loss-control-detail-table td:nth-child(n+4) { width: 108px; text-align: right; }
.loss-control-attention-table td:nth-child(3) strong,
.loss-control-detail-table td:nth-child(3) strong { display: block; line-height: 1.25; overflow-wrap: break-word; }
.loss-control-attention-table td:nth-child(3) small,
.loss-control-detail-table td:nth-child(3) small { display: block; margin-top: 6px; overflow-wrap: break-word; }
.is-point-filtered .loss-control-attention-table,
.is-point-filtered .loss-control-detail-table { min-width: 1080px; }
.is-point-filtered .loss-control-zero-table { min-width: 920px; }
.is-point-filtered .loss-control-attention-table th:nth-child(1),
.is-point-filtered .loss-control-attention-table td:nth-child(1),
.is-point-filtered .loss-control-detail-table th:nth-child(1),
.is-point-filtered .loss-control-detail-table td:nth-child(1) { width: 70px; }
.is-point-filtered .loss-control-attention-table th:nth-child(2),
.is-point-filtered .loss-control-attention-table td:nth-child(2) { width: 380px; }
.is-point-filtered .loss-control-detail-table th:nth-child(2),
.is-point-filtered .loss-control-detail-table td:nth-child(2) { width: 330px; }
.is-point-filtered .loss-control-attention-table th:nth-child(n+3),
.is-point-filtered .loss-control-attention-table td:nth-child(n+3),
.is-point-filtered .loss-control-detail-table th:nth-child(n+3),
.is-point-filtered .loss-control-detail-table td:nth-child(n+3) { width: 108px; text-align: right; }
.loss-control-zero-table th:nth-child(1),
.loss-control-zero-table td:nth-child(1) { width: 104px; }
.loss-control-zero-table th:nth-child(2),
.loss-control-zero-table td:nth-child(2) { width: 70px; }
.loss-control-zero-table th:nth-child(3),
.loss-control-zero-table td:nth-child(3),
.loss-control-zero-table th:nth-child(4),
.loss-control-zero-table td:nth-child(4) { width: 280px; }
.loss-control-zero-table th:nth-child(n+5),
.loss-control-zero-table td:nth-child(n+5) { width: 100px; text-align: right; }
.is-point-filtered .loss-control-zero-table th:nth-child(1),
.is-point-filtered .loss-control-zero-table td:nth-child(1) { width: 70px; }
.is-point-filtered .loss-control-zero-table th:nth-child(2),
.is-point-filtered .loss-control-zero-table td:nth-child(2),
.is-point-filtered .loss-control-zero-table th:nth-child(3),
.is-point-filtered .loss-control-zero-table td:nth-child(3) { width: 300px; text-align: left; }
.is-point-filtered .loss-control-zero-table th:nth-child(n+4),
.is-point-filtered .loss-control-zero-table td:nth-child(n+4) { width: 100px; text-align: right; }
.loss-control-warning {
  display: block;
  margin-top: 8px;
  color: #f2ce76;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
}
.loss-control-note { margin-top: 10px; }
.loss-control-note summary {
  width: max-content;
  color: var(--color-accent);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}
.loss-control-note form {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}
.loss-control-note textarea { width: 100%; min-width: 0; resize: vertical; }
.loss-control-note button { width: max-content; min-height: 38px; padding: 8px 12px; }

.loss-control-owner-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 18px 0;
  padding: 22px 26px;
  border: 1px solid rgba(228, 123, 66, 0.65);
  border-left: 5px solid #e47b42;
  border-radius: 8px;
  background: #241f1a;
}
.loss-control-owner-alert span,
.exception-location {
  color: #e9a06f;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.loss-control-owner-alert h2 { margin: 5px 0 4px; font-size: 25px; }
.loss-control-owner-alert p { margin: 0; color: #c7bdb4; }
.loss-control-owner-alert .button { flex: 0 0 auto; }

.owner-decision-queue,
.owner-decision-queue * { letter-spacing: 0; }
.owner-decision-queue { display: grid; gap: 22px; }
.decision-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--color-border);
}
.decision-page-head h1 { margin: 4px 0 8px; font-size: 42px; line-height: 1.08; }
.decision-page-head p { max-width: 880px; margin: 0; color: var(--color-text-muted); font-size: 17px; }
.decision-page-head .button { flex: 0 0 auto; }
.decision-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.decision-summary-card {
  min-height: 126px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 18px;
  border: 1px solid var(--color-border);
  border-top: 4px solid var(--color-info);
  border-radius: 8px;
  background: var(--color-card);
}
.decision-summary-card span,
.decision-summary-card small { color: var(--color-text-muted); }
.decision-summary-card span { font-size: 13px; font-weight: 850; text-transform: uppercase; }
.decision-summary-card strong { font-size: 34px; line-height: 1; }
.decision-summary-card.tone-critical { border-top-color: var(--color-danger); }
.decision-summary-card.tone-critical strong { color: #f18b80; }
.decision-summary-card.tone-warning { border-top-color: var(--color-warning); }
.decision-summary-card.tone-warning strong { color: #f0ca71; }
.decision-summary-card.tone-success { border-top-color: var(--color-success); }
.decision-summary-card.tone-success strong { color: #83d7a2; }
.decision-filter-bar {
  display: grid;
  grid-template-columns: 1.05fr 1.2fr 1fr 1.6fr auto auto;
  align-items: end;
  gap: 12px;
  padding: 18px 0 22px;
  border-bottom: 1px solid var(--color-border);
}
.decision-filter-bar label,
.exception-decision-form label { color: var(--color-text-muted); font-size: 13px; font-weight: 800; }
.decision-filter-bar input,
.decision-filter-bar select,
.exception-decision-form input,
.exception-decision-form select,
.exception-decision-form textarea {
  min-height: 48px;
  border: 1px solid var(--color-border-strong);
  border-radius: 6px;
  background: var(--color-bg-soft);
  color: var(--color-text);
}
.decision-filter-bar .primary,
.decision-filter-bar .secondary { border-radius: 6px; white-space: nowrap; }
.exception-queue-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-top: 2px;
}
.exception-queue-head h2 { margin: 0 0 4px; font-size: 28px; }
.exception-queue-head p { margin: 0; color: var(--color-text-muted); }
.exception-list { display: grid; gap: 18px; }
.exception-card {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--color-border-strong);
  border-left: 5px solid var(--color-info);
  border-radius: 8px;
  background: var(--color-card);
  box-shadow: var(--shadow-soft);
}
.exception-card.severity-critical { border-left-color: var(--color-danger); }
.exception-card.severity-warning { border-left-color: var(--color-warning); }
.exception-card.severity-info { border-left-color: var(--color-info); }
.exception-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.exception-product-title { min-width: 0; }
.exception-card-head h3 { margin: 5px 0 3px; font-size: 26px; line-height: 1.2; overflow-wrap: anywhere; }
.exception-card-head small { color: var(--color-text-muted); }
.exception-status-stack { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.severity-pill,
.status-pill {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid var(--color-border-strong);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}
.severity-pill.severity-critical { background: var(--color-danger-soft); color: #f1a098; }
.severity-pill.severity-warning { background: var(--color-warning-soft); color: #f2ce76; }
.severity-pill.severity-info { background: var(--color-info-soft); color: #9ccbf3; }
.exception-plain-language {
  margin-top: 18px;
  padding: 15px 0 2px;
  border-top: 1px solid var(--color-border);
}
.exception-plain-language strong { font-size: 15px; }
.exception-plain-language p { max-width: 1040px; margin: 5px 0 0; color: var(--color-text-muted); }
.exception-type-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.exception-type-list span {
  padding: 6px 9px;
  border: 1px solid var(--color-border-strong);
  border-radius: 4px;
  background: var(--color-bg-soft);
  color: #ddd2c8;
  font-size: 12px;
  font-weight: 750;
}
.exception-math-wrap,
.exception-evidence-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  margin-top: 18px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
}
.exception-math-table { min-width: 930px; table-layout: fixed; }
.exception-math-table th,
.exception-evidence-table th {
  background: #191714;
  color: var(--color-text-muted);
  text-transform: uppercase;
}
.exception-math-table th,
.exception-math-table td { padding: 11px 10px; text-align: center; }
.exception-math-table td { background: var(--color-bg-soft); font-size: 20px; font-weight: 850; }
.value-danger { color: #f18b80; }
.value-warning { color: #f0ca71; }
.value-empty { color: var(--color-text-soft); font-size: 13px; font-weight: 700; }
.exception-signal-block {
  margin-top: 16px;
  padding: 15px 0 2px 18px;
  border-left: 3px solid var(--color-danger);
}
.exception-signal-block > strong { font-size: 15px; }
.exception-signal-block ul { display: grid; gap: 6px; margin: 8px 0 0; padding-left: 20px; color: var(--color-text-muted); }
.exception-signal-block b { color: var(--color-text); }
.exception-suggestion {
  display: grid;
  gap: 9px;
  margin-top: 16px;
  padding: 14px 0 2px;
  border-top: 1px solid var(--color-border);
}
.exception-suggestion > div { display: flex; flex-wrap: wrap; gap: 7px; }
.exception-suggestion span {
  padding: 6px 9px;
  border-radius: 4px;
  background: var(--color-info-soft);
  color: #acd3f4;
  font-size: 13px;
}
.exception-evidence { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--color-border); }
.exception-evidence summary { width: max-content; max-width: 100%; color: #d9cec4; cursor: pointer; font-weight: 850; }
.exception-evidence[open] summary { color: var(--color-accent-hover); }
.exception-evidence-table { min-width: 980px; table-layout: auto; }
.exception-evidence-table th,
.exception-evidence-table td { padding: 11px 12px; }
.exception-evidence-table td:nth-child(3),
.exception-evidence-table td:nth-child(4) { text-align: right; font-variant-numeric: tabular-nums; }
.evidence-empty { color: var(--color-text-muted); text-align: center !important; }
.exception-decision-zone { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--color-border-strong); }
.exception-recommended-action {
  display: grid;
  gap: 5px;
  margin-bottom: 20px;
  padding: 16px 18px;
  border: 1px solid color-mix(in srgb, var(--color-success) 62%, var(--color-border));
  border-left: 5px solid var(--color-success);
  border-radius: 8px;
  background: var(--color-success-soft);
}
.exception-recommended-action > span {
  color: #9bd8b1;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.exception-recommended-action strong { color: #b7ebc8; font-size: 20px; }
.exception-recommended-action p { margin: 0; color: var(--color-text); }
.exception-decision-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.exception-decision-head h4 { margin: 0 0 4px; font-size: 20px; }
.exception-decision-head p { margin: 0; color: var(--color-text-muted); }
.exception-decision-head > span { color: var(--color-text-soft); font-size: 12px; }
.exception-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.exception-action-choice {
  position: relative;
  min-height: 132px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 16px;
  border: 2px solid #5a4d42;
  border-radius: 8px;
  background: #26211d;
  color: var(--color-text);
  text-align: left;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .18);
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.exception-action-choice:hover {
  border-color: var(--color-accent-hover);
  background: #302720;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .28);
  transform: translateY(-2px);
}
.exception-action-choice:focus-visible { outline: none; border-color: var(--color-accent-hover); box-shadow: var(--focus), var(--shadow-soft); }
.exception-action-choice.is-active {
  border-color: var(--color-accent-hover);
  background: rgba(217, 121, 67, .18);
  box-shadow: inset 0 0 0 1px var(--color-accent-hover), var(--focus);
}
.exception-action-choice.exception-action-recommended {
  grid-column: 1 / -1;
  min-height: 112px;
  border-color: color-mix(in srgb, var(--color-success) 70%, var(--color-border));
  background: rgba(79, 180, 119, .13);
}
.exception-action-choice.exception-action-recommended:hover,
.exception-action-choice.exception-action-recommended.is-active {
  border-color: #72d495;
  background: rgba(79, 180, 119, .2);
}
.decision-action-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--color-border-strong);
  border-radius: 8px;
  background: #171411;
  font-size: 24px;
  line-height: 1;
}
.decision-action-copy { min-width: 0; display: grid; gap: 5px; }
.decision-action-copy strong { font-size: 17px; line-height: 1.25; }
.decision-action-copy small { color: var(--color-text-muted); font-size: 13px; line-height: 1.4; }
.decision-action-cta {
  align-self: end;
  color: var(--color-accent-hover);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}
.exception-action-choice.is-active .decision-action-cta { color: #f6b38c; }
.exception-action-choice.exception-action-recommended .decision-action-cta { color: #96dfb0; }
.exception-action-panels { margin-top: 12px; }
.exception-decision-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, .45fr);
  gap: 12px;
  align-items: end;
  padding: 17px;
  border: 1px solid var(--color-border-strong);
  border-radius: 6px;
  background: #191714;
}
.exception-decision-form[hidden] { display: none; }
.decision-form-copy,
.decision-reason,
.decision-warning { grid-column: 1 / -1; }
.decision-form-copy strong { font-size: 18px; }
.decision-form-copy p { margin: 3px 0 0; color: var(--color-text-muted); }
.exception-decision-form textarea { width: 100%; resize: vertical; }
.decision-warning { margin: 0; color: #f0ca71; font-size: 13px; }
.exception-decision-form button { width: max-content; min-height: 48px; border-radius: 6px; }
.exception-leftover-form { border-color: color-mix(in srgb, var(--color-success) 54%, var(--color-border)); }
.exception-resolution {
  display: grid;
  gap: 5px;
  margin-top: 20px;
  padding: 15px 0 2px 18px;
  border-left: 3px solid var(--color-success);
}
.exception-resolution > span,
.exception-resolution small { color: #9bc8aa; }
.exception-resolution > span { font-size: 12px; font-weight: 850; text-transform: uppercase; }
.exception-resolution p { margin: 3px 0; color: var(--color-text-muted); }
.exception-empty {
  min-height: 240px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  padding: 36px 24px;
  border: 1px dashed var(--color-border-strong);
  border-radius: 8px;
  text-align: center;
}
.exception-empty strong { font-size: 22px; }
.exception-empty p { margin: 0; color: var(--color-text-muted); }

@media (max-width: 1120px) {
  .loss-control-owner-alert { align-items: stretch; flex-direction: column; }
  .decision-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .decision-filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .exception-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .decision-page-head,
  .exception-card-head,
  .exception-decision-head { align-items: stretch; flex-direction: column; }
  .decision-page-head h1 { font-size: 34px; }
  .decision-page-head .button,
  .decision-filter-bar .button,
  .decision-filter-bar button { width: 100%; }
  .decision-summary,
  .decision-filter-bar,
  .exception-action-grid,
  .exception-decision-form { grid-template-columns: 1fr; }
  .exception-card { padding: 17px; }
  .exception-status-stack { justify-content: flex-start; }
  .exception-action-choice,
  .exception-action-choice.exception-action-recommended {
    grid-column: auto;
    min-height: 124px;
    grid-template-columns: 44px minmax(0, 1fr);
  }
  .decision-action-icon { width: 44px; height: 44px; }
  .decision-action-cta { grid-column: 2; justify-self: start; }
  .decision-form-copy,
  .decision-reason,
  .decision-warning { grid-column: auto; }
  .exception-decision-form button { width: 100%; }
}
.cash-discipline-table { min-width: 1680px; table-layout: fixed; }
.cash-discipline-table th,
.cash-discipline-table td { overflow-wrap: normal; word-break: normal; }
.cash-discipline-table th:nth-child(1),
.cash-discipline-table td:nth-child(1) { width: 120px; }
.cash-discipline-table th:nth-child(2),
.cash-discipline-table td:nth-child(2),
.cash-discipline-table th:nth-child(3),
.cash-discipline-table td:nth-child(3) { width: 150px; }
.cash-discipline-table th:nth-child(13),
.cash-discipline-table td:nth-child(13),
.cash-discipline-table th:nth-child(15),
.cash-discipline-table td:nth-child(15) { width: 220px; }
.cash-discipline-table th:nth-child(n+4):nth-child(-n+12),
.cash-discipline-table td:nth-child(n+4):nth-child(-n+12),
.cash-discipline-table th:nth-child(14),
.cash-discipline-table td:nth-child(14) { width: 104px; text-align: right; }
input, select, textarea { max-width: 100%; transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: var(--focus); }
.form-grid, .catalog-filters, .analytics-filters, .cash-admin-filters, .ai-period-form, .calendar-rule-row, .business-memory-search,
.export-date-form, .order-admin-filters { min-width: 0; }
.form-grid > *, .catalog-filters > *, .analytics-filters > *, .cash-admin-filters > *, .ai-period-form > *, .calendar-rule-row > *,
.business-memory-search > *, .export-date-form > *, .order-admin-filters > * { min-width: 0; }
.filter-actions, .cash-export-actions, .export-download-actions { flex-wrap: wrap; }
.sidebar { overflow-y: auto; scrollbar-width: thin; } .sidebar nav a { min-width: 0; } .nav-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mobile-header { box-shadow: 0 8px 22px rgba(25, 23, 20, .06); } .mobile-nav { box-shadow: 0 -12px 28px rgba(25, 23, 20, .18); } .mobile-nav a { min-width: 0; } .mobile-nav a.active { color: #fff; background: rgba(213, 106, 54, .26); }
.staff-home, .staff-work-shell, .delivery-shell, .order-app-shell, .leftovers-shell, .cash-staff-shell { width: min(100%, 1180px); }
.staff-task-card, .staff-order-task-list a, .delivery-list > div, .leftovers-product, .cash-context div, .cash-live-totals > div { min-width: 0; }
.staff-task-copy, .order-category-copy, .category-product-copy { min-width: 0; } .staff-task-copy h2, .order-category-copy h2, .category-product-copy h2 { overflow-wrap: anywhere; }
.pin-key, .staff-submit, .staff-start-button, .delivery-action, .category-step, .category-action, .cash-complete-button, .leftovers-submit { touch-action: manipulation; }
.ai-chart-panel { overflow: hidden; } .ai-chart-panel canvas { display: block; max-width: 100%; }
.ai-grid > *, .ai-director-grid > *, .business-memory-layout > * { min-width: 0; } .ai-compact-list li { overflow: hidden; } .ai-compact-list li span { max-width: 100%; } .ai-compact-list b { float: none; display: inline-block; margin-left: 8px; }
.director-event-list, .business-memory-events { scrollbar-width: thin; }
@media (max-width: 1440px) {
  .app-shell { grid-template-columns: 236px minmax(0, 1fr); } .sidebar { padding: 20px 14px; }
  .sidebar nav a { min-height: 44px; padding: 9px 11px; gap: 10px; } .nav-icon { width: 22px; font-size: 18px; }
  .content-inner { max-width: 1240px; padding-top: 30px; }
  .metric-grid, .export-metrics, .ai-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cash-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .cash-admin-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .catalog-layout, .users-layout, .business-memory-layout { grid-template-columns: 1fr; } .sticky-form { position: static; }
}
@media (max-width: 1280px) {
  .content-inner { max-width: 1080px; padding-left: 26px; padding-right: 26px; } .page-head { align-items: flex-start; }
  .split-layout { grid-template-columns: 1fr; } .catalog-filters { grid-template-columns: 1fr 1fr; } .analytics-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cash-context, .cash-live-totals { grid-template-columns: repeat(3, minmax(0, 1fr)); } .cash-money-grid, .cash-admin-edit, .cash-detail-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ai-grid.two, .ai-director-grid.two, .export-document-guide { grid-template-columns: 1fr; } .order-detail-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1050px) {
  .content { overflow: visible; } .sidebar { display: none; } .app-shell { display: block; }
  .mobile-header { display: flex; position: sticky; top: 0; z-index: 20; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 18px; background: rgba(245, 243, 239, .94); backdrop-filter: blur(12px); }
  .mobile-header .sidebar-brand { margin: 0; } .mobile-header > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-weight: 800; }
  .mobile-nav { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); gap: 4px; padding: 7px max(8px, env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); background: rgba(25, 23, 20, .97); }
  .mobile-nav a { display: grid; place-items: center; gap: 2px; min-height: 54px; border-radius: 13px; color: #c9c4be; } .mobile-nav span { font-size: 20px; line-height: 1; } .mobile-nav small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
  .content-inner { padding-bottom: calc(96px + env(safe-area-inset-bottom)); } .settings-block, .import-panel, .import-result { max-width: none; }
}
@media (max-width: 900px) {
  .page-head { gap: 14px; margin-bottom: 20px; } .page-head h1 { font-size: clamp(30px, 8vw, 44px); } .panel { padding: 18px; border-radius: 16px; } .section-head { align-items: flex-start; }
  .form-grid, .catalog-filters, .analytics-filters, .cash-admin-filters, .ai-period-form, .business-memory-search, .order-admin-filters, .calendar-rule-row { grid-template-columns: 1fr; }
  .metric-grid, .export-metrics, .cash-summary-grid, .cash-context, .cash-live-totals, .cash-money-grid, .cash-admin-edit, .cash-detail-meta, .ai-grid.four, .order-detail-metrics { grid-template-columns: 1fr 1fr; }
  .permission-grid { grid-template-columns: 1fr; } .excel-format { grid-template-columns: 1fr 1fr; } .cash-export-actions { justify-content: stretch; } .cash-export-actions > * { flex: 1 1 180px; }
}
@media (max-width: 760px) {
  .content-inner { padding-left: 14px; padding-right: 14px; } .panel { padding: 16px; } .metric { padding: 16px; } .metric strong { font-size: 28px; }
  table { min-width: 680px; } th, td { padding: 11px 12px; } .table-panel .section-head { padding: 18px 18px 0; }
  .staff-home-header, .staff-work-header, .delivery-header, .order-app-header { gap: 12px; } .staff-home, .staff-work-shell, .delivery-shell, .order-app-shell { padding-left: 14px; padding-right: 14px; }
  .staff-task-card { grid-template-columns: 58px minmax(0, 1fr); } .delivery-actions, .order-main-actions, .export-download-actions { grid-template-columns: 1fr; } .cash-photo-upload { flex-direction: column; align-items: stretch; }
}
@media (max-width: 560px) {
  .metric-grid, .export-metrics, .cash-summary-grid, .cash-context, .cash-live-totals, .cash-money-grid, .cash-admin-edit, .cash-detail-meta, .ai-grid.four, .order-detail-metrics, .excel-format, .order-confirm-meta, .order-success-details { grid-template-columns: 1fr; }
  .page-head h1 { letter-spacing: -.03em; } .primary, .secondary, .button { width: 100%; } .section-head a.button, .page-head a.button { width: auto; }
  .staff-brand { flex-direction: column; } .staff-login-shell { min-height: auto; } .pin-key { min-height: 62px; }
  .staff-task-icon, .task-icon { width: 56px; height: 56px; font-size: 28px; } .cash-confirmation > div { flex-direction: column; }
}
@media (min-width: 1800px) { .content-inner { max-width: 1680px; } .metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .ai-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media print { .sidebar, .mobile-header, .mobile-nav, .page-head a, form button { display: none !important; } .app-shell, .content, .content-inner { display: block; padding: 0; max-width: none; } body { background: #fff; } .panel, .metric { box-shadow: none; break-inside: avoid; } }

.order-date-list { margin-top: 18px; }
.order-date-card.draft { border-color: #f1d28a; background: #fffaf0; }
.order-date-card.submitted { border-color: #b9dfc4; background: #f2fbf4; }
.order-date-card.locked, .order-date-card.expired { opacity: .78; }
.order-new-date-panel, .order-recommended-panel { margin: 18px 0; }
.order-new-date-panel { display: grid; gap: 14px; }
.order-restriction-note { color: #766b62; font-weight: 700; }

.dm-tabs{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:18px}.dm-bulk-form{display:grid;gap:14px}.dm-actions{display:grid;grid-template-columns:minmax(240px,1fr) auto;gap:10px;padding:16px}.dm-record{display:grid;grid-template-columns:180px minmax(0,1fr);gap:8px 14px}.dm-record dt{color:#766b62;font-weight:800}.dm-record dd{margin:0;overflow-wrap:anywhere}.dm-danger{display:grid;gap:10px;margin-top:16px;padding-top:16px;border-top:1px solid var(--line)}.dm-danger.delete{border-color:#f1bbb3}@media(max-width:760px){.dm-actions,.dm-record{grid-template-columns:1fr}}


.dual-counter{display:grid;gap:10px;min-width:280px}.counter-row{display:grid;grid-template-columns:80px 56px 72px 56px;align-items:center;gap:8px}.counter-row span{font-weight:800;color:#6d6258}.counter-row.staff{background:#fff7ed;border-radius:18px;padding:8px}.quick-leftovers-screen .quick-leftover-search,.quick-leftover-entry{display:grid;grid-template-columns:1fr auto;gap:12px;margin:18px 0}.quick-leftover-entry{grid-template-columns:1.4fr .6fr auto;background:#fff;border:1px solid #eadfd5;border-radius:24px;padding:16px}.quick-leftover-entry label{display:grid;gap:8px;font-weight:800}.quick-leftover-entry input,.quick-leftover-search input,.quick-match-row input{font-size:22px;border:1px solid #d9c9bc;border-radius:16px;padding:14px 16px}.quick-leftover-matches,.quick-leftover-added{display:grid;gap:12px;margin-top:22px}.quick-match-row,.quick-leftover-added div{display:grid;grid-template-columns:1fr 120px 130px;gap:12px;align-items:center;background:#fff;border:1px solid #eadfd5;border-radius:20px;padding:14px}.quick-match-row div{display:grid;gap:4px}.quick-match-row small,.quick-leftover-added span,.quick-leftover-added small{color:#8d7b6c}.quick-leftover-added div{grid-template-columns:110px 1fr 90px 70px}.quick-leftover-added em{font-style:normal;font-weight:900;color:#302c27}.inventory-task-icon{background:#ecfdf5;color:#166534}@media(max-width:760px){.dual-counter{min-width:0}.counter-row{grid-template-columns:1fr 48px 58px 48px}.quick-leftover-search,.quick-leftover-entry,.quick-match-row,.quick-leftover-added div{grid-template-columns:1fr}.quick-leftover-entry input,.quick-leftover-search input,.quick-match-row input{font-size:20px}}


.order-landing-shell .order-dashboard-grid,
.order-app-shell .order-dashboard-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

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

.order-history-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid #e5ddd4;
  border-radius: 18px;
  background: #fff;
}

.order-history-main strong,
.order-history-main span,
.order-history-main small,
.order-history-main p {
  display: block;
}

.order-history-main small,
.order-history-main p,
.order-recommendation-list li {
  color: #6f665e;
}

.order-history-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.order-history-actions form {
  margin: 0;
}

.order-recommendation-list {
  margin: 0;
  padding-left: 20px;
}

.order-comment-panel textarea,
.order-category-screen textarea {
  width: 100%;
  min-height: 96px;
  border-radius: 16px;
  border: 1px solid #d8cfc4;
  padding: 14px;
  font: inherit;
  resize: vertical;
  background: #fff;
}

.order-comment-actions,
.order-main-actions-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.inline-action-form {
  margin: 0;
}

.order-main-actions-compact .button,
.order-main-actions-compact .order-primary-action {
  min-height: 48px;
}

.category-search-bar {
  display: grid;
  gap: 8px;
  margin: 14px 0 18px;
}

.category-search-bar input {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid #d8cfc4;
  font: inherit;
}

.category-search-hint {
  color: #7a7168;
  font-size: 13px;
}

.category-split-counters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: center;
  width: 100%;
}

.counter-block {
  display: grid;
  gap: 6px;
}

.counter-block span {
  color: #7a7168;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.counter-row {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #e1d7cd;
  border-radius: 16px;
  padding: 8px 10px;
  background: #faf8f5;
}

.counter-row .category-step {
  width: 42px;
  height: 42px;
  border-radius: 14px;
}

.counter-row .category-quantity,
.total-block strong {
  font-size: 22px;
  font-weight: 700;
}

.total-block {
  align-items: center;
  justify-items: center;
  text-align: center;
}

.total-block strong {
  color: #191714;
}

.order-search-empty {
  margin-top: 16px;
}

.order-confirm-comment,
.order-success-comment,
.detail-comment-panel {
  margin-top: 16px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid #e5ddd4;
  background: #fff;
}

.order-confirm-comment span,
.order-success-comment span,
.detail-comment-panel h2 {
  display: block;
  color: #7a7168;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.order-confirm-comment p,
.order-success-comment p,
.detail-comment-panel p {
  margin: 8px 0 0;
}

.order-live-summary.single {
  grid-template-columns: 1fr;
}

.staff-task-card .order-admin-status {
  white-space: nowrap;
}

@media (max-width: 1024px) {
  .order-landing-shell .order-dashboard-grid,
  .order-app-shell .order-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .category-split-counters {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .order-history-card,
  .order-history-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .order-main-actions-compact,
  .order-comment-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .counter-row {
    width: 100%;
  }
}

.receiving-shell { max-width: 1240px; }
.receiving-content { width: min(1180px, 100%); }
.receiving-order-panel { margin-bottom: 18px; }
.receiving-order-grid, .detail-meta-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.receiving-order-grid > div, .detail-meta-grid > div { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #faf8f5; }
.receiving-order-grid span, .detail-meta-grid span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.receiving-order-grid strong, .detail-meta-grid strong { display: block; margin-top: 5px; font-size: 18px; }
.receiving-order-comment { margin: 14px 0 0; color: var(--muted); }
.receiving-form { display: grid; gap: 18px; }
.receiving-table-panel { padding: 0; }
.receiving-table-wrap { overflow-x: auto; }
.receiving-table { min-width: 1180px; }
.receiving-input, .receiving-comment { min-height: 52px; font-size: 16px; }
.receiving-input { width: 110px; text-align: center; font-size: 20px; font-weight: 800; }
.receiving-comment { min-width: 200px; }
.receiving-status { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 850; white-space: nowrap; }
.receiving-status.status-ok { background: var(--success); color: #278452; }
.receiving-status.status-issue { background: var(--error); color: #a13f2d; }
.receiving-status.status-over { background: #fff0e5; color: #be5b2d; }
.receiving-comment-panel textarea { width: 100%; min-height: 120px; }
.receiving-actions { margin-top: 2px; }
.receiving-live-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.receiving-live-card {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.receiving-live-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.receiving-live-card strong {
  display: block;
  margin-top: 6px;
  font-size: 28px;
  line-height: 1;
}
.receiving-card-list { display: grid; gap: 12px; padding: 18px; }
.receiving-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #e7dfd8;
  border-radius: 18px;
  background: #fff;
}
.receiving-card.has-issue {
  border-color: #dba27d;
  background: #fffaf6;
}
.receiving-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}
.receiving-card-head strong { display: block; margin-top: 4px; font-size: 22px; line-height: 1.15; }
.receiving-card-head small { display: block; margin-top: 5px; color: var(--muted); }
.receiving-code {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f4eee9;
  color: #5f554d;
  font-size: 12px;
  font-weight: 900;
}
.receiving-card-grid {
  display: grid;
  grid-template-columns: 110px 1fr minmax(180px, 240px) 110px;
  gap: 12px;
  align-items: end;
}
.receiving-stat {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #faf8f5;
}
.receiving-stat span,
.receiving-fact-field span,
.receiving-comment-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.receiving-stat strong {
  font-size: 24px;
  line-height: 1;
}
.receiving-quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.receiving-quick-button {
  min-height: 52px;
  border: 1px solid #d8d0c8;
  border-radius: 14px;
  background: #f3f0eb;
  font-size: 15px;
  font-weight: 850;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.receiving-quick-button.danger {
  border-color: #e5b5aa;
  background: #fff0ec;
  color: #a13f2d;
}
.receiving-fact-field,
.receiving-comment-field {
  display: grid;
  gap: 6px;
}
.receiving-fact-field .receiving-input {
  width: 100%;
  min-height: 56px;
}
.receiving-comment-field .receiving-comment {
  width: 100%;
  min-width: 0;
}
.delivery-result-card { width: min(720px, 100%); }
.delivery-result-details { margin-bottom: 24px; }
.deliveries-metrics strong { font-size: 30px; }
.deliveries-filters { grid-template-columns: minmax(220px, 1.4fr) 180px 180px 170px 170px auto; }
@media (max-width: 1050px) {
  .receiving-order-grid, .detail-meta-grid { grid-template-columns: 1fr 1fr; }
  .receiving-live-summary { grid-template-columns: 1fr 1fr; }
  .receiving-card-grid { grid-template-columns: 1fr 1fr; }
  .receiving-quick-actions,
  .receiving-fact-field,
  .receiving-comment-field { grid-column: 1 / -1; }
  .deliveries-filters { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .receiving-order-grid, .detail-meta-grid, .receiving-live-summary, .receiving-card-grid {
    grid-template-columns: 1fr;
  }
  .receiving-card-head { flex-direction: column; align-items: stretch; }
  .receiving-status { width: fit-content; }
}


/* Staff task dashboard */
.task-dashboard-shell { width: min(1180px, calc(100vw - 32px)); }
.task-dashboard { display: grid; gap: 22px; }
.task-dashboard-greeting p { margin-top: 8px; color: var(--muted); }
.task-dashboard-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.task-summary-card {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.74);
  box-shadow: var(--shadow);
  min-width: 0;
}
.task-summary-card small {
  display: block;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 12px;
}
.task-summary-card strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
  line-height: 1;
}
.staff-cash-pulse {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255,255,255,.82);
  box-shadow: var(--shadow);
}
.staff-cash-pulse.state-up {
  border-color: #b7dbc0;
  background: #f6fbf7;
}
.staff-cash-pulse.state-down {
  border-color: #e5aaa2;
  background: #fff6f4;
}
.staff-cash-pulse.state-flat {
  border-color: #ded2c4;
}
.staff-cash-pulse.state-muted {
  border-color: #ded2c4;
  background: #fbfaf8;
}
.staff-cash-pulse-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.staff-cash-pulse-head span,
.staff-cash-pulse-grid span {
  display: block;
  color: #6b5b50;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.staff-cash-pulse-head h2 {
  margin: 6px 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1;
}
.staff-cash-pulse-head p {
  margin: 0;
  color: #4f4740;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
}
.staff-cash-pulse-head a {
  flex: 0 0 auto;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}
.staff-cash-pulse-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.staff-cash-pulse-grid article {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(70,58,48,.12);
  border-radius: 16px;
  background: rgba(255,255,255,.72);
}
.staff-cash-pulse-grid strong {
  display: block;
  margin: 8px 0 6px;
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}
.staff-cash-pulse-grid small {
  color: #4f4740;
  font-weight: 700;
  line-height: 1.35;
}
.metric-up { color: #1f7a4b !important; }
.metric-down { color: #a13f2d !important; }
.metric-flat,
.metric-muted { color: #6b5b50 !important; }

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

.analytics-control-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.analytics-control-card span {
  color: #6b5b50;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.analytics-control-card strong {
  display: block;
  margin: 8px 0 6px;
  font-size: 30px;
  line-height: 1;
}

.analytics-control-card small {
  color: #4f4740;
  font-weight: 750;
}

.analytics-percent {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 8px;
  font-weight: 900;
}

.analytics-percent.up {
  color: #1f7a4b;
  background: #e4f4e9;
}

.analytics-percent.down {
  color: #a13f2d;
  background: #f8dfdc;
}

.analytics-percent.flat,
.analytics-percent.muted {
  color: #5f554c;
  background: #eee8df;
}

.analytics-signal {
  display: inline-flex;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 10px;
  font-weight: 900;
}

.analytics-signal.critical {
  color: #a13f2d;
  background: #f8dfdc;
}

.analytics-signal.warning {
  color: #8b5c18;
  background: #fff2cb;
}

.analytics-signal.success {
  color: #1f7a4b;
  background: #e4f4e9;
}

.analytics-signal.flat {
  color: #5f554c;
  background: #eee8df;
}

.bakery-cash-table td,
.bakery-product-table td {
  vertical-align: top;
}
.task-section { display: grid; gap: 12px; }
.task-section-head { margin-bottom: 2px; }
.task-section-count {
  min-width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #f0ebe4;
  color: var(--ink);
  font-weight: 850;
}
.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.task-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f2ece6;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}
.task-subtasks {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}
.task-subtask {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f7f2eb;
}
.task-subtask strong { display: block; }
.task-subtask small { color: var(--muted); }
.task-subtask-marker {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #efe7df;
  font-weight: 800;
}
.task-subtask.completed {
  background: #eaf6ef;
}
.task-subtask.completed .task-subtask-marker {
  background: #d6eddc;
  color: #277b4b;
}
.task-subtask.overdue {
  background: #faecea;
}
.task-subtask.overdue .task-subtask-marker {
  background: #f1c6c1;
  color: #b83f35;
}
.task-subtask.locked {
  background: #f0ede9;
}
.task-subtask.locked .task-subtask-marker {
  background: #ded8d1;
  color: #80786f;
}
.task-card.completed {
  border-color: rgba(55,162,101,.22);
}
.task-card.overdue {
  border-color: rgba(217,90,79,.24);
}
.task-card.locked {
  border-color: rgba(170,163,155,.35);
}
.task-action {
  display: flex;
  justify-content: flex-end;
}
.task-action .staff-start-button {
  width: 100%;
  max-width: 170px;
}
.task-action .disabled-task { pointer-events: none; }
.task-status.overdue { color: #b83f35; }
.task-status.overdue i { background: #d95a4f; }
.task-status.locked { color: var(--muted); }
.task-status.locked i { background: #aaa39b; }
@media (max-width: 980px) {
  .task-dashboard-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .staff-cash-pulse-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .task-dashboard-summary { grid-template-columns: 1fr; }
  .staff-cash-pulse-head { display: grid; }
  .staff-cash-pulse-head a { width: fit-content; }
  .staff-cash-pulse-grid { grid-template-columns: 1fr; }
  .task-section-count { min-width: 36px; height: 36px; }
  .task-action .staff-start-button { max-width: none; }
}


/* Owner dashboard */
.owner-dashboard-head { align-items: flex-end; gap: 24px; }
.owner-hero-grid, .owner-summary-grid, .shop-status-grid, .system-grid { display: grid; gap: 16px; }
.owner-hero-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 20px; }
.owner-hero-grid-detail { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.owner-hero-card, .owner-summary-card, .attention-card, .shop-card, .timeline-item, .system-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.owner-hero-card { padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; min-height: 116px; }
.owner-hero-card span, .owner-summary-card span, .timeline-time, .priority-badge { color: #4a433d; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.owner-hero-card strong, .owner-summary-card strong { font-size: 30px; line-height: 1.05; }
.owner-hero-card small, .owner-summary-card small { color: #4f4740; }
.owner-hero-card-accent { background: linear-gradient(135deg, rgba(145, 94, 32, .16), rgba(25, 23, 20, .04)); }
.owner-summary-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.owner-summary-card { padding: 18px; display: flex; flex-direction: column; gap: 8px; min-height: 140px; }
.owner-summary-card.tone-success strong { color: #1f7a4b; }
.owner-summary-card.tone-warning strong { color: #9a6516; }
.owner-summary-card.tone-critical strong { color: #a13f2d; }
.owner-summary-card.tone-accent strong { color: #af4f24; }
.owner-finance-ranking-head { margin-top: 24px; }
.owner-finance-split { font-size: 22px !important; overflow-wrap: anywhere; }
.owner-bakery-money-table { margin-top: 20px; }
.table-subline { display: block; margin-top: 3px; color: var(--muted); }
.qr-mapping-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 18px; }
.qr-product-search {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 10px;
  margin-bottom: 14px;
}

.qr-product-search input {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: #fff;
  font-weight: 800;
}

.qr-product-mapping-list { display: grid; gap: 10px; }
.qr-product-mapping-row {
  display: grid;
  grid-template-columns: minmax(240px, .8fr) minmax(360px, 1.2fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.qr-product-mapping-source { display: grid; gap: 5px; }
.qr-product-mapping-source > div { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.qr-product-mapping-source small, .qr-product-mapping-source p { margin: 0; color: var(--muted); }
.qr-product-suggestion {
  width: fit-content;
  max-width: 100%;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f6f0ea;
  color: var(--text) !important;
  font-weight: 900;
}

.qr-product-suggestion.strong {
  border-color: #9ed2ad;
  background: #f2fbf4;
  color: #1f6b42 !important;
}

.qr-product-suggestion.weak {
  border-color: #d8bd73;
  background: #fff9e6;
  color: #7b510f !important;
}

.qr-product-suggestion.none {
  color: #6b5b50 !important;
}

.qr-product-mapping-form { display: grid; grid-template-columns: minmax(220px, 1fr) auto; gap: 10px; }
.leftovers-list-screen { padding-bottom: 110px; }
.leftovers-list-head { display: flex; justify-content: space-between; gap: 18px; align-items: end; }
.leftovers-list-head h1 { margin: 4px 0; }
.leftovers-list-head p { margin: 0; color: var(--muted); }
.leftovers-progress {
  min-width: 108px;
  display: grid;
  gap: 2px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-align: center;
}
.leftovers-progress strong { font-size: 22px; }
.leftovers-progress span { color: var(--muted); font-size: 12px; }
.leftovers-progress.confirmed {
  border-color: rgba(39, 138, 72, .42);
  background: rgba(39, 138, 72, .10);
}
.leftovers-batch-list { display: grid; gap: 10px; margin-top: 18px; }
.leftover-product-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid #aaa39b;
  border-radius: 6px;
  background: var(--surface);
}
.leftover-product-card.reconciliation-match { border-left-color: var(--success); }
.leftover-product-card.reconciliation-mismatch { border-left-color: var(--danger); }
.leftover-product-main { display: grid; gap: 7px; min-width: 0; }
.leftover-product-main > strong { font-size: 18px; overflow-wrap: anywhere; }
.leftover-product-code { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.leftover-product-facts { display: flex; flex-wrap: wrap; gap: 8px; }
.leftover-product-facts span {
  padding: 6px 8px;
  border-radius: 4px;
  background: rgba(249, 247, 244, .9);
  color: var(--muted);
  font-size: 13px;
}
.leftover-product-facts b { color: var(--text); }
.reconciliation-result { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.reconciliation-result small { color: var(--muted); }
.leftover-quantity-control { display: grid; gap: 7px; }
.leftover-quantity-control > label { color: var(--muted); font-size: 12px; text-transform: uppercase; text-align: center; }
.leftover-quantity-control > div { display: grid; grid-template-columns: 44px minmax(72px, 1fr) 44px; gap: 6px; }
.leftover-quantity-control input {
  width: 100%;
  min-width: 0;
  height: 48px;
  text-align: center;
  font-size: 22px;
  font-weight: 800;
}
.leftover-step { width: 44px; height: 48px; padding: 0; font-size: 24px; }
.leftover-zero { padding: 7px 10px; background: transparent; color: var(--muted); border: 1px solid var(--line); }
.leftovers-submit-bar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.96);
  box-shadow: 0 -8px 24px rgba(25,23,20,.08);
}
.leftovers-submit-bar > div { display: grid; gap: 2px; }
.leftovers-submit-bar span { color: var(--muted); font-size: 12px; }
.start-inventory-shell { max-width: 1120px; }
.start-inventory-confirmed {
  display: grid;
  gap: 4px;
  margin: 18px 0;
  padding: 16px 18px;
  border: 1px solid rgba(39, 138, 72, .30);
  border-radius: 14px;
  background: rgba(39, 138, 72, .10);
}
.start-inventory-confirmed strong { color: #1f7a3f; }
.start-inventory-confirmed span { color: var(--muted); }
.start-inventory-card {
  border-left-color: #d56a36;
}
.start-inventory-card input[readonly] {
  background: #f3eee8;
  color: #655a51;
}
.start-inventory-admin-filters {
  grid-template-columns: 220px minmax(240px, 1fr) auto;
}
.order-recommendation-panel {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(39,138,72,.28);
  border-left: 4px solid #278a48;
  border-radius: 6px;
  background: #eef8f1;
}
.order-recommendation-panel > div { display: grid; gap: 4px; }
.order-recommendation-panel .eyebrow { color: #225f38; }
.order-recommendation-panel strong { color: #1d2f23; }
.order-recommendation-panel small { color: #46594d; }
.order-product-name { display: grid; gap: 4px; }
.order-recommendation-badge {
  width: fit-content;
  padding: 3px 6px;
  border-radius: 4px;
  background: #dff2e5;
  color: #1f6b3d;
  font-size: 11px;
  font-weight: 800;
}
.order-recommendation-badge.confidence-low { background: #f8ead7; color: #8a5815; }
.order-recommendation-note {
  color: #4f4740;
  font-size: 12px;
  line-height: 1.35;
}
.owner-loss-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}
.owner-loss-grid h3 { margin: 0 0 10px; }
.owner-control-list { display: grid; gap: 8px; }
.owner-control-row {
  display: grid;
  grid-template-columns: minmax(120px, .7fr) minmax(0, 1.3fr);
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 4px solid #aaa39b;
  border-radius: 6px;
  color: inherit;
  text-decoration: none;
}
.owner-control-row span { color: var(--muted); text-align: right; }
.owner-control-row.control-success { border-left-color: var(--success); }
.owner-control-row.control-warning { border-left-color: var(--danger); }
.owner-loss-bakery { margin-top: 20px; }
.owner-loss-changes { margin-top: 22px; }
.owner-loss-changes h3 { margin: 0 0 10px; }
@media (max-width: 800px) {
  .qr-mapping-summary, .qr-product-mapping-row, .qr-product-mapping-form { grid-template-columns: 1fr; }
  .leftovers-list-head { align-items: stretch; }
  .leftover-product-card { grid-template-columns: 1fr; }
  .leftovers-submit-bar { align-items: stretch; flex-direction: column; }
  .leftovers-submit-bar button { width: 100%; }
  .order-recommendation-panel { align-items: stretch; flex-direction: column; }
  .order-recommendation-panel button { width: 100%; }
  .owner-loss-grid { grid-template-columns: 1fr; }
  .owner-control-row { grid-template-columns: 1fr; }
  .owner-control-row span { text-align: left; }
}
.owner-close-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.owner-close-facts > div {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.owner-close-facts span { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.owner-close-facts strong { font-size: 22px; }
.owner-close-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .8fr); gap: 18px; }
.owner-close-checks, .owner-close-blockers { display: grid; gap: 10px; align-content: start; }
.owner-close-check {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.owner-close-check > span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-weight: 800;
}
.owner-close-check small { color: var(--muted); }
.owner-close-check.is-done > span { color: white; background: var(--success); }
.owner-close-check.is-pending > span { color: white; background: var(--danger); }
.owner-close-blockers h3 { margin: 0 0 2px; }
.owner-close-blockers a {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  border-left: 3px solid var(--danger);
  background: rgba(171, 75, 41, .06);
  color: inherit;
  text-decoration: none;
}
.owner-close-blockers a span { color: var(--muted); font-size: 13px; }
@media (max-width: 800px) {
  .owner-close-facts, .owner-close-layout { grid-template-columns: 1fr; }
  .owner-close-check { grid-template-columns: 28px 1fr; }
  .owner-close-check small { grid-column: 2; }
}
.attention-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.attention-card { padding: 16px 18px; display: grid; gap: 10px; text-decoration: none; color: inherit; }
.attention-card strong { font-size: 18px; line-height: 1.2; }
.attention-card small { color: var(--muted); min-height: 38px; }
.attention-card-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.priority-badge { padding: 4px 9px; border-radius: 999px; background: #f4efe8; color: #453d36; }
.priority-critical { border-color: rgba(171, 75, 41, .45); box-shadow: 0 12px 28px rgba(171, 75, 41, .12); }
.priority-warning { border-color: rgba(196, 135, 60, .35); }
.priority-success { border-color: rgba(52, 126, 72, .3); }
.priority-critical .priority-badge { background: rgba(171, 75, 41, .12); color: #8d3126; }
.priority-warning .priority-badge { background: rgba(196, 135, 60, .14); color: #7b5315; }
.priority-success .priority-badge { background: rgba(52, 126, 72, .12); color: #1c6c41; }
.delivery-issues-table {
  min-width: 1320px;
  table-layout: fixed;
}
.delivery-issues-table th,
.delivery-issues-table td {
  padding: 14px 12px;
  vertical-align: top;
}
.delivery-issues-table th {
  white-space: nowrap;
}
.delivery-issues-table td {
  white-space: normal;
}
.delivery-col-date { width: 110px; }
.delivery-col-point { width: 124px; }
.delivery-col-product { width: 220px; }
.delivery-col-reason { width: 138px; }
.delivery-col-qty { width: 82px; }
.delivery-col-diff { width: 86px; }
.delivery-col-comment { width: 210px; }
.delivery-col-user { width: 150px; }
.delivery-col-status { width: 110px; }
.delivery-col-actions { width: 320px; }
.delivery-issue-date strong,
.delivery-issue-point,
.delivery-issue-user {
  display: block;
  white-space: nowrap;
}
.delivery-issue-product,
.delivery-issue-comment,
.delivery-issue-reason {
  line-height: 1.35;
  overflow-wrap: break-word;
}
.delivery-issue-comment {
  max-width: 210px;
}
.delivery-issue-diff.positive { color: #1d6f45; }
.delivery-issue-diff.negative { color: #9a3026; }
.delivery-issue-status .status-pill {
  margin-top: 2px;
}
.delivery-issue-action-stack {
  display: grid;
  gap: 10px;
  align-content: start;
}
.delivery-issue-action-stack .table-link {
  width: max-content;
  white-space: nowrap;
}
.issue-resolution-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 108px;
  gap: 8px;
  align-items: start;
}
.issue-resolution-form select,
.issue-resolution-form input {
  min-height: 40px;
  padding: 8px 10px;
}
.issue-resolution-form input {
  grid-column: 1 / -1;
}
.issue-resolution-form .button {
  min-height: 40px;
  width: 100%;
}
.delivery-issue-resolution-row td {
  background: #fbfaf8;
}
.delivery-issue-resolution {
  padding-top: 10px;
  padding-bottom: 14px;
}
.delivery-issue-resolution small {
  display: block;
  color: var(--muted);
  line-height: 1.4;
}
@media (max-width: 980px) {
  .delivery-issues-table {
    min-width: 1100px;
  }
}
.shop-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.shop-grid-wide { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.shop-card { padding: 18px; display: flex; flex-direction: column; gap: 14px; text-decoration: none; color: inherit; }
.shop-card-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.shop-card-top h3 { margin: 4px 0 0; font-size: 22px; line-height: 1.1; }
.shop-overall-badge { padding: 7px 11px; border-radius: 999px; background: #f4efe8; font-weight: 800; white-space: nowrap; }
.shop-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shop-status-grid span { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 14px; background: rgba(249, 247, 244, .8); }
.shop-status-grid strong { font-size: 12px; text-transform: uppercase; color: var(--muted); }
.shop-status-grid small { font-size: 14px; font-weight: 800; }
.status-success { border-color: rgba(52, 126, 72, .3); }
.status-warning { border-color: rgba(196, 135, 60, .28); }
.status-critical { border-color: rgba(171, 75, 41, .36); }
.status-success .shop-overall-badge { color: var(--success); }
.status-warning .shop-overall-badge { color: var(--warning); }
.status-critical .shop-overall-badge { color: var(--danger); }
.ai-summary-list { display: grid; gap: 10px; }
.ai-summary-item { padding: 14px 16px; border-radius: 14px; background: rgba(249, 247, 244, .82); }
.timeline-list { display: grid; gap: 12px; }
.timeline-item { padding: 14px 16px; display: grid; grid-template-columns: 74px 1fr; gap: 12px; align-items: flex-start; }
.timeline-time { padding-top: 2px; }
.timeline-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.timeline-head span { font-weight: 800; }
.timeline-body p { margin: 6px 0 0; color: var(--muted); }
.system-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.system-card { padding: 18px; display: grid; gap: 8px; text-decoration: none; color: inherit; min-height: 120px; }
.system-card strong { font-size: 18px; }
.system-card small { color: var(--muted); }
.owner-task-section { margin-top: 16px; }
.owner-task-section .task-section-head h3 { margin: 0; }
@media (max-width: 1200px) {
  .owner-hero-grid, .owner-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .owner-hero-grid-detail { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .shop-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .owner-hero-grid, .owner-summary-grid, .owner-hero-grid-detail { grid-template-columns: 1fr; }
  .timeline-item { grid-template-columns: 1fr; }
  .shop-status-grid { grid-template-columns: 1fr; }
}
.qr-filter {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
}
.qr-filter label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}
.qr-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.qr-point {
  display: grid;
  gap: 7px;
}
.qr-point > span,
.qr-point > small { color: var(--muted); }
.qr-mappings {
  display: grid;
  gap: 8px;
}
.qr-mappings > div {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) 24px minmax(140px, 1fr);
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.employee-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.employee-table td:first-child,
.employee-table td:nth-child(6) { display: grid; gap: 3px; }
.employee-table small,
.muted-text { color: var(--muted); }
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--muted);
}
.status-dot.success { background: #2f8f58; }
.status-dot.warning { background: #c78a27; }
.status-pill {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}
.status-pill.success { color: #145d34; background: #dff3e7; }
.status-pill.critical { color: #8f2823; background: #f8dfdc; }
.status-pill.muted { color: #4a433d; background: #ece9e4; }
.qr-employee-list { display: grid; }
.qr-employee-list > div {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.qr-employee-list small { color: var(--muted); }
.employee-create summary,
.employee-edit-list summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}
.employee-create summary span,
.employee-edit-list summary span { color: var(--muted); }
.employee-create form,
.employee-edit-list form { margin-top: 18px; }
.employee-edit-list { display: grid; gap: 10px; }
.shift-today-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.shift-today-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid #7d7871;
  border-radius: 6px;
}
.shift-today-card.status-success { border-left-color: #2f8f58; }
.shift-today-card.status-critical { border-left-color: #c84f45; }
.shift-today-card > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.shift-today-card dl { display: grid; gap: 7px; margin: 14px 0 0; }
.shift-today-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.shift-today-card dt { color: var(--muted); }
.shift-today-card dd { margin: 0; font-weight: 700; text-align: right; }
@media (max-width: 800px) {
  .employee-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qr-employee-list > div { grid-template-columns: 1fr; gap: 3px; }
}
.order-list-shell { padding-bottom: 110px; }
.order-list-screen { display: grid; gap: 16px; }
.order-list-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}
.order-list-heading h1 { margin: 4px 0 0; }
.order-save-state {
  color: #27734a;
  font-size: 13px;
  font-weight: 700;
}
.order-save-state.saving { color: #9a6b1d; }
.order-save-state.error { color: #a63e36; }
.order-code-panel {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  background: #fff;
}
.order-code-panel > label:first-child { font-weight: 700; }
.order-code-panel small { color: #4f4740; }
.order-touch-toolbar { display: grid; gap: 10px; }
.order-touch-group { display: flex; gap: 8px; flex-wrap: wrap; }
.order-chip {
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid #ddd3ca;
  border-radius: 999px;
  background: #f6f1ec;
  color: #5f554d;
  font-size: 15px;
  font-weight: 850;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.order-chip.active {
  border-color: #d56a36;
  background: #fff1e8;
  color: #9c4320;
}
.order-code-search-row {
  display: grid;
  grid-template-columns: 1fr 44px;
  gap: 8px;
}
.order-code-search-row input {
  min-width: 0;
  height: 48px;
  font-size: 17px;
}
.order-selected-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.order-product-table {
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}
.order-group-block + .order-group-block { border-top: 1px solid var(--line); }
.order-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  background: #fbf6f1;
  border-top: 1px solid var(--line);
}
.order-group-head strong {
  font-size: 17px;
  line-height: 1.2;
}
.order-group-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.order-product-head,
.order-product-row {
  display: grid;
  grid-template-columns: 64px minmax(210px, 1fr) 176px 176px 58px;
  gap: 10px;
  align-items: center;
}
.order-product-head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px 12px;
  color: var(--muted);
  background: rgba(240, 237, 232, .96);
  backdrop-filter: blur(10px);
  font-size: 12px;
  font-weight: 700;
}
.order-product-row {
  min-height: 72px;
  padding: 9px 12px;
  border-top: 1px solid var(--line);
}
.order-product-row.selected { background: #f4faf6; }
.order-product-row.selected .order-product-code { color: #278a48; }
.order-product-code {
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}
.order-product-name {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.order-product-name strong { overflow-wrap: anywhere; }
.order-product-name small { color: var(--muted); }
.order-number-control {
  display: grid;
  grid-template-columns: 42px 64px 42px;
  gap: 4px;
}
.mobile-counter-label { display: none; }
.order-number-control button,
.order-number-control input {
  width: 100%;
  height: 42px;
  padding: 0;
  text-align: center;
}
.order-number-control button {
  border: 1px solid var(--line);
  background: #f3f0eb;
  font-size: 22px;
}
.order-number-control input {
  border: 1px solid #b9b3aa;
  font-size: 17px;
  font-weight: 700;
}
.row-total { text-align: center; font-size: 18px; }
.order-list-footer {
  position: fixed;
  z-index: 20;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 12px max(18px, calc((100vw - 1180px) / 2));
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,.97);
}
.order-list-footer > div {
  display: grid;
  margin-right: auto;
}
.order-list-footer > div span { color: var(--muted); font-size: 12px; }
.order-list-footer > div strong { font-size: 22px; }
.order-primary-action.disabled {
  pointer-events: none;
  opacity: .45;
}
.button.secondary.danger,
.secondary.danger {
  border-color: #e8b2aa;
  color: #9a302b;
  background: #fff7f5;
}
.button.secondary.danger:hover,
.secondary.danger:hover {
  border-color: #d98f84;
  background: #fdebe7;
}
@media (max-width: 820px) {
  .order-list-heading { align-items: start; flex-direction: column; }
  .order-product-head { display: none; }
  .order-group-head {
    padding: 12px 10px;
    align-items: flex-start;
    flex-direction: column;
  }
  .order-product-row {
    grid-template-columns: 50px minmax(0, 1fr) 44px;
    gap: 8px;
    padding: 12px 10px;
  }
  .order-product-code { grid-column: 1; grid-row: 1; }
  .order-product-name { grid-column: 2; grid-row: 1; }
  .row-total { grid-column: 3; grid-row: 1; }
  .order-number-control {
    grid-column: 1 / -1;
    grid-template-columns: 62px 44px minmax(64px, 1fr) 44px;
  }
  .order-number-control:nth-of-type(2) { margin-top: 2px; }
  .mobile-counter-label {
    display: block;
    align-self: center;
    color: var(--muted);
    font-size: 12px;
  }
  .order-touch-group { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .order-touch-group:last-child { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-chip { width: 100%; padding: 0 10px; }
  .order-list-footer {
    padding: 10px;
    flex-wrap: wrap;
  }
  .order-list-footer .order-primary-action { flex: 1; text-align: center; }
}
.day-close-head {
  align-items: flex-end;
}

.day-close-filter {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.day-close-filter input[type="date"] {
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  background: #fff;
  color: var(--text);
  font-weight: 800;
}

.day-close-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 18px;
}

.day-close-decision {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin: 0 0 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.day-close-decision span {
  display: block;
  margin-bottom: 6px;
  color: #6b5b50;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.day-close-decision h2 {
  margin: 0 0 6px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
}

.day-close-decision p {
  margin: 0;
  color: #4f4740;
  font-size: 16px;
  line-height: 1.45;
}

.day-close-decision.state-success {
  border-color: #acd7ba;
  background: #f6fbf7;
}

.day-close-decision.state-warning {
  border-color: #dfc67b;
  background: #fffaf0;
}

.day-close-decision.state-critical {
  border-color: #e7aaa2;
  background: #fff5f3;
}

.morning-control-summary .owner-summary-card {
  color: var(--text);
  text-decoration: none;
}

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

.morning-control-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
  gap: 18px;
  margin-bottom: 18px;
}

.morning-blocker-list,
.morning-mismatch-grid {
  display: grid;
  gap: 12px;
}

.morning-blocker-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.morning-blocker,
.morning-mismatch {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: #fff;
  text-decoration: none;
}

.morning-blocker.state-critical {
  border-color: #e2a497;
  background: #fff7f5;
}

.morning-blocker.state-warning {
  border-color: #dcc27a;
  background: #fffaf0;
}

.morning-blocker.state-success {
  border-color: #add6bb;
  background: #f7fbf8;
}

.morning-blocker span,
.morning-mismatch span {
  color: #6b5b50;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.morning-blocker strong,
.morning-mismatch strong {
  font-size: 17px;
  line-height: 1.25;
}

.morning-blocker small,
.morning-mismatch small,
.morning-ai-answer {
  color: #4f4740;
  line-height: 1.45;
}

.morning-ai-answer {
  white-space: pre-wrap;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfaf8;
  font-weight: 700;
}

.morning-ai-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.morning-money-table td {
  vertical-align: top;
}

.morning-money-table .status-pill {
  margin-bottom: 6px;
}

.danger-text {
  color: #a13f2d;
  font-weight: 800;
}

.morning-mismatch-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.morning-bakery-cash-panel {
  margin-bottom: 18px;
}

.morning-bakery-cash-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.morning-bakery-cash-summary article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfaf8;
}

.morning-bakery-cash-summary span,
.morning-bakery-cash-alert span {
  display: block;
  color: #6b5b50;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.morning-bakery-cash-summary strong {
  display: block;
  margin: 7px 0 5px;
  font-size: 28px;
  line-height: 1;
}

.morning-bakery-cash-summary small {
  color: #4f4740;
  font-weight: 750;
}

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

.morning-bakery-cash-alert {
  display: grid;
  gap: 7px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: #fff;
  text-decoration: none;
}

.morning-bakery-cash-alert.state-critical {
  border-color: #e2a497;
  background: #fff7f5;
}

.morning-bakery-cash-alert.state-warning {
  border-color: #dcc27a;
  background: #fffaf0;
}

.morning-bakery-cash-alert strong {
  font-size: 18px;
  line-height: 1.2;
}

.morning-bakery-cash-alert small {
  color: #4f4740;
  line-height: 1.35;
}

.morning-bakery-cash-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 4px;
}

.morning-bakery-cash-metrics b {
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(255,255,255,.78);
  color: #4f4740;
  font-size: 12px;
}

.day-close-decision-numbers {
  min-width: 180px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(255,255,255,.75);
  text-align: center;
}

.day-close-decision-numbers strong {
  display: block;
  font-size: 34px;
  line-height: 1;
}

.day-close-decision-numbers small {
  color: #5f554c;
  font-weight: 800;
}

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

.day-close-priority-panel {
  margin-bottom: 18px;
}

.day-close-priority-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.day-close-priority {
  display: grid;
  gap: 7px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  text-decoration: none;
  background: #fff;
}

.day-close-priority span {
  color: #6b5b50;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.day-close-priority strong {
  color: var(--text);
  font-size: 16px;
  line-height: 1.25;
}

.day-close-priority small {
  color: #5f554c;
  line-height: 1.35;
}

.day-close-priority.state-critical {
  border-color: #e5a19a;
  background: #fff1ef;
}

.day-close-priority.state-warning {
  border-color: #d8bd73;
  background: #fff9e6;
}

.day-close-shop-list {
  display: grid;
  gap: 14px;
}

.day-close-shop {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.day-close-shop.state-success {
  border-color: #bdddc7;
}

.day-close-shop.state-warning {
  border-color: #dfc67b;
  background: #fffdf6;
}

.day-close-shop.state-critical {
  border-color: #e7aaa2;
  background: #fff8f7;
}

.day-close-shop header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.day-close-shop header > div:first-child {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.day-close-shop .table-link {
  font-size: 22px;
  font-weight: 950;
}

.day-close-shift-time {
  color: #5f554c;
  font-weight: 800;
  text-align: right;
}

.day-close-money {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.day-close-money > div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.78);
}

.day-close-money span {
  display: block;
  margin-bottom: 5px;
  color: #6b5b50;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.day-close-money strong {
  display: block;
  color: var(--text);
  font-size: 20px;
  line-height: 1.15;
}

.day-close-money small {
  color: #5f554c;
  font-weight: 800;
}

.day-close-cash-alert {
  padding: 10px 12px;
  border-radius: 12px;
  color: #8f2823;
  background: #f8dfdc;
  font-weight: 900;
}

.day-close-cash-alert.state-warning {
  color: #7b510f;
  background: #fff1c7;
}

.week-close-lock-note {
  margin: 0;
  color: #7b510f;
  font-weight: 900;
}

.week-close-control-panel,
.week-close-cash-panel {
  margin-top: 18px;
}

.week-close-group-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.week-close-group {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.week-close-group span {
  color: #6b5b50;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.week-close-group strong {
  color: var(--text);
  font-size: 30px;
  line-height: 1;
}

.week-close-group small {
  color: #5f554c;
  font-weight: 800;
}

.week-close-group.state-critical,
.week-close-cash-row.state-critical {
  background: #fff3f1;
}

.week-close-group.state-warning,
.week-close-cash-row.state-warning {
  background: #fff9e6;
}

.week-close-group.state-success,
.week-close-cash-row.state-success {
  background: #f2fbf4;
}

.week-close-cash-panel table td,
.week-close-cash-panel table th {
  white-space: nowrap;
}

.week-close-cash-panel table td:first-child,
.week-close-cash-panel table th:first-child,
.week-close-cash-panel table td:last-child,
.week-close-cash-panel table th:last-child {
  white-space: normal;
}

.ai-agent-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}

.ai-agent-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.ai-agent-card {
  display: grid;
  gap: 16px;
}

.ai-agent-card header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.ai-agent-card h2 {
  margin: 8px 0 6px;
}

.ai-agent-card p {
  margin: 0;
  color: #5f554c;
}

.ai-agent-latest {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.ai-agent-latest.completed {
  border-color: #9ed2ad;
  background: #f2fbf4;
}

.ai-agent-latest.failed {
  border-color: #e3a193;
  background: #fff3f1;
}

.ai-agent-latest strong,
.ai-agent-latest small {
  display: block;
}

.ai-agent-latest small {
  margin-top: 3px;
  color: #6b5b50;
  font-weight: 800;
}

.ai-agent-latest p {
  white-space: pre-wrap;
  color: var(--text);
  font-weight: 700;
  line-height: 1.45;
}

@media(max-width: 900px) {
  .ai-agent-grid,
  .ai-agent-summary {
    grid-template-columns: 1fr;
  }
  .ai-agent-card header {
    flex-direction: column;
  }
}

.day-close-check-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
}

.day-close-check {
  display: grid;
  gap: 4px;
  min-height: 94px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  text-decoration: none;
}

.day-close-check > span {
  color: #6b5b50;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.day-close-check strong {
  font-size: 14px;
  color: var(--text);
  line-height: 1.15;
}

.day-close-check small {
  font-size: 12px;
  color: #5f554c;
  line-height: 1.25;
}

.day-close-check.state-success {
  border-color: #9ed2ad;
  background: #f2fbf4;
}

.day-close-check.state-warning {
  border-color: #d8bd73;
  background: #fff9e6;
}

.day-close-check.state-critical {
  border-color: #e5a19a;
  background: #fff1ef;
}

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

.day-close-blocker {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  text-decoration: none;
}

.day-close-blocker strong {
  font-size: 16px;
  color: var(--text);
}

.day-close-blocker span {
  font-weight: 900;
  color: var(--text);
}

.day-close-blocker small {
  color: #5f554c;
  line-height: 1.35;
}

.day-close-blocker.state-critical {
  border-color: #e5a19a;
  background: #fff1ef;
}

.day-close-blocker.state-warning {
  border-color: #d8bd73;
  background: #fff9e6;
}

.week-close-head {
  align-items: flex-end;
}

.week-close-action-panel {
  margin-bottom: 18px;
}

.week-close-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.week-close-create-form {
  margin: 0;
}

.week-close-day-list {
  display: grid;
  gap: 10px;
}

.week-close-day {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) 180px;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  text-decoration: none;
}

.week-close-day.state-success {
  border-color: #9ed2ad;
  background: #f2fbf4;
}

.week-close-day.state-warning {
  border-color: #d8bd73;
  background: #fff9e6;
}

.week-close-day.state-critical {
  border-color: #e5a19a;
  background: #fff1ef;
}

.week-close-day span {
  display: block;
  color: #6b5b50;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.week-close-day strong {
  color: var(--text);
  font-size: 18px;
}

.week-close-day small {
  color: #5f554c;
  font-weight: 800;
}

.weekly-auto-status {
  margin-bottom: 18px;
}

.weekly-auto-status .week-close-actions {
  margin-top: 12px;
}

@media (max-width: 1100px) {
  .day-close-summary,
  .day-close-priority-grid,
  .day-close-blocker-grid,
  .morning-blocker-list,
  .morning-mismatch-grid,
  .morning-bakery-cash-summary,
  .morning-bakery-cash-grid,
  .analytics-control-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .morning-control-grid {
    grid-template-columns: 1fr;
  }

  .day-close-check-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .day-close-money {
    grid-template-columns: 1fr;
  }

  .week-close-day {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .day-close-head {
    align-items: stretch;
  }

  .day-close-filter {
    justify-content: stretch;
  }

  .day-close-filter > * {
    flex: 1 1 160px;
  }

  .day-close-decision,
  .day-close-shop header {
    display: grid;
  }

  .day-close-decision-numbers {
    min-width: 0;
    text-align: left;
  }

  .day-close-summary,
  .day-close-priority-grid,
  .day-close-blocker-grid,
  .morning-blocker-list,
  .morning-mismatch-grid,
  .morning-bakery-cash-summary,
  .morning-bakery-cash-grid,
  .analytics-control-grid {
    grid-template-columns: 1fr;
  }

  .day-close-check-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .day-close-shift-time {
    text-align: left;
  }

  .week-close-actions > * {
    width: 100%;
  }
}

/* ==========================
   Staff Home iPad-first redesign
   ========================== */
.staff-home-redesign {
  background:
    radial-gradient(circle at 85% 0%, rgba(217, 121, 67, .14), transparent 30%),
    var(--color-bg);
}

.staff-home-shell {
  width: min(1180px, 100%);
  display: grid;
  gap: var(--space-6);
  padding-bottom: calc(112px + env(safe-area-inset-bottom));
}

.staff-home-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: var(--space-4);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--color-border);
}

.staff-home-day {
  display: grid;
  gap: var(--space-1);
  min-width: 150px;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg-soft);
}

.staff-home-day span,
.staff-home-summary-card span,
.staff-home-bottom-action span {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.staff-home-day strong {
  color: var(--color-text);
  font-size: var(--font-size-md);
}

.staff-home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr);
  gap: var(--space-5);
  align-items: stretch;
}

.staff-home-intro,
.staff-home-progress-card,
.staff-next-task,
.staff-home-summary-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-card);
  box-shadow: var(--shadow-card);
}

.staff-home-intro {
  display: grid;
  align-content: center;
  gap: var(--space-3);
  min-height: 230px;
  padding: clamp(28px, 4vw, 46px);
}

.staff-home-intro h1 {
  max-width: 760px;
  margin: 0;
  color: var(--color-text);
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.02;
}

.staff-home-intro p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-md);
}

.staff-home-progress-card {
  display: grid;
  align-content: center;
  gap: var(--space-4);
  padding: var(--space-5);
}

.staff-home-progress-card .progress-copy {
  margin: 0;
}

.staff-home-stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.staff-home-stat-row span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--color-bg-soft);
  color: var(--color-text-muted);
  font-weight: 850;
}

.staff-next-task {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, auto);
  gap: var(--space-5);
  align-items: center;
  padding: clamp(22px, 3vw, 34px);
  border-color: color-mix(in srgb, var(--color-accent) 38%, var(--color-border));
}

.staff-next-task-copy {
  display: grid;
  gap: var(--space-3);
  min-width: 0;
}

.staff-next-task h2 {
  margin: 0;
  color: var(--color-text);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.08;
}

.staff-next-task p {
  max-width: 720px;
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-md);
}

.staff-next-task-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-muted);
  font-weight: 800;
}

.staff-home-main-action {
  min-height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--space-6);
  text-align: center;
  text-decoration: none;
}

.staff-home-quick-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: var(--space-4);
}

.staff-home-summary-card {
  display: grid;
  gap: var(--space-2);
  min-height: 150px;
  padding: var(--space-5);
}

.staff-home-summary-card strong {
  color: var(--color-text);
  font-size: var(--font-size-lg);
  line-height: 1.15;
}

.staff-home-summary-card p {
  margin: 0;
  color: var(--color-text-muted);
}

.staff-start-inventory-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, auto);
  gap: var(--space-5);
  align-items: center;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid color-mix(in srgb, var(--staff-accent) 42%, var(--staff-border));
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(223, 107, 51, .20), var(--staff-surface-2));
  box-shadow: var(--shadow-card);
}

.staff-start-inventory-entry.is-done {
  border-color: color-mix(in srgb, var(--staff-success) 40%, var(--staff-border));
  background: linear-gradient(135deg, rgba(122, 212, 154, .14), var(--staff-surface-2));
}

.staff-start-inventory-copy {
  display: grid;
  gap: var(--space-3);
  min-width: 0;
}

.staff-start-inventory-copy h2 {
  margin: 0;
  color: var(--staff-text);
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.05;
}

.staff-start-inventory-copy p {
  max-width: 680px;
  margin: 0;
  color: var(--staff-text-muted);
  font-size: var(--font-size-md);
}

.staff-start-inventory-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

.staff-start-inventory-meta > span {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 var(--space-3);
  border: 1px solid var(--staff-border);
  border-radius: var(--radius-pill);
  background: rgba(255, 247, 236, .08);
  color: var(--staff-text-muted);
  font-weight: 900;
}

.staff-start-inventory-action {
  display: flex;
  justify-content: flex-end;
}

.staff-home-task-board {
  display: grid;
  gap: var(--space-6);
}

.staff-home-task-section {
  display: grid;
  gap: var(--space-4);
}

.staff-task-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.staff-home-task-card {
  min-height: 190px;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: var(--space-4);
  padding: var(--space-5);
}

.staff-home-task-card .task-action {
  grid-column: 1 / -1;
}

.staff-home-task-card .staff-start-button {
  width: 100%;
  min-height: 58px;
}

.staff-home-empty {
  min-height: 120px;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg-soft);
}

.staff-home-bottom-action {
  position: fixed;
  z-index: 25;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  left: max(18px, env(safe-area-inset-left));
  width: min(1120px, calc(100vw - 36px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-3);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-xl);
  background: rgba(20, 18, 16, .92);
  box-shadow: var(--shadow-elevated);
  backdrop-filter: blur(16px);
}

.staff-home-bottom-action strong {
  display: block;
  color: var(--color-text);
  font-size: var(--font-size-md);
}

@media (max-width: 900px) {
  .staff-home-topbar,
  .staff-home-hero,
  .staff-next-task,
  .staff-start-inventory-entry,
  .staff-home-quick-summary,
  .staff-task-grid,
  .staff-home-bottom-action {
    grid-template-columns: 1fr;
  }

  .staff-home-topbar {
    align-items: stretch;
  }

  .staff-home-day {
    min-width: 0;
  }

  .staff-home-intro {
    min-height: 190px;
  }

  .staff-next-task-action,
  .staff-start-inventory-action,
  .staff-home-main-action {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .staff-home-shell {
    padding-left: 14px;
    padding-right: 14px;
  }

  .staff-home-intro h1 {
    font-size: 38px;
  }

  .staff-home-bottom-action {
    width: auto;
  }
}

/* ==========================
   GoodBuns ERP Phase 1
   Design tokens foundation overrides
   ========================== */
.app-body { background: var(--color-bg); color: var(--color-text); }
.app-shell { background: var(--color-bg); }
.content-inner { color: var(--color-text); }
.page-head h1, .section-head h2, h1, h2, h3 { color: var(--color-text); }
.page-head p, .section-head p, small, .empty, .empty-state p { color: var(--color-text-muted); }
.eyebrow { color: var(--color-accent-hover); }

.sidebar { background: var(--sidebar); border-right: 1px solid var(--color-border); }
.sidebar nav a:hover, .sidebar nav a.active { background: var(--color-card-hover); }
.sidebar-user { border-top-color: var(--color-border); }
.avatar, .icon-button { background: var(--color-card-hover); }
.mobile-header { background: rgba(20, 18, 16, .94); color: var(--color-text); border-bottom: 1px solid var(--color-border); }

.panel, .metric, .card, .metric-card, .task-card,
.table-panel, .catalog-create, .catalog-table, .settings-entity-card,
.delivery-manifest, .problem-form, .refrigerator-card, .order-submit-panel,
.order-confirm-list section, .order-success-details > div, .export-document-guide article,
.bakery-point-card, .bakery-doc-card, .cash-summary-card, .cash-detail-meta > div,
.cash-live-totals > div, .ai-recommendation, .ai-rank-row, .director-event,
.business-memory-event, .business-memory-day-card, .receiving-order-grid > div,
.detail-meta-grid > div, .quick-leftover-entry, .quick-match-row, .quick-leftover-added div {
  background: var(--color-card);
  border-color: var(--color-border);
  color: var(--color-text);
}

.panel:hover, .metric:hover, .card:hover, .metric-card:hover, .task-card:hover,
.bakery-point-card:hover, .bakery-doc-card:hover, .ai-recommendation:hover,
.director-event:hover, .business-memory-event:hover {
  background: var(--color-card-hover);
  border-color: var(--color-border-strong);
}

.catalog-category, .tag, .excel-format span, .file-picker,
.staff-logout, .staff-start-button.secondary-task, .order-date-card.draft,
.order-date-card.submitted, .bakery-status-card.warning, .bakery-point-card.missing,
.cash-summary-card.warning, .cash-row-yellow, .director-event.warning,
.counter-row.staff {
  background: var(--color-bg-soft);
  border-color: var(--color-border);
  color: var(--color-text);
}

.notice.success, .success, .import-result.success { background: var(--color-success-soft); color: #a6e8bb; }
.notice.error, .error, .import-result.error { background: var(--color-danger-soft); color: #f2aaa3; }
.warning, .cash-status.draft, .gb-badge.warning, .status-pill.warning { background: var(--color-warning-soft); color: #f2ce76; }
.danger, .gb-badge.danger, .status-pill.danger, .status-pill.critical { background: var(--color-danger-soft); color: #f1a098; }
.info, .badge-info, .status-pill.info { background: var(--color-info-soft); color: #9ccbf3; }

.table-wrap, .table-responsive, .receiving-table-wrap { border-radius: var(--radius-lg); }
table { background: transparent; }
th { background: var(--color-bg-soft); color: var(--color-text-muted); border-bottom-color: var(--color-border); }
td { border-bottom-color: var(--color-border); }
tr:last-child td { border-bottom-color: transparent; }

input, select, textarea,
.quick-leftover-entry input, .quick-leftover-search input, .quick-match-row input,
.receiving-input, .receiving-comment {
  background: var(--color-bg-soft);
  border-color: var(--color-border-strong);
  color: var(--color-text);
}

.primary, .button.primary, .staff-submit, .staff-start-button, .delivery-action,
.category-action.primary, .order-primary-action, .cash-complete-button, .leftovers-submit,
.temperature-submit, .order-success-button {
  background: var(--color-accent);
  color: #100e0d;
}
.primary:hover, .button.primary:hover, .staff-submit:hover, .staff-start-button:hover,
.delivery-action:hover, .category-action.primary:hover, .order-primary-action:hover,
.cash-complete-button:hover, .leftovers-submit:hover {
  background: var(--color-accent-hover);
}
.secondary, .button, .button.secondary, .category-action.save {
  background: var(--color-bg-soft);
  border-color: var(--color-border-strong);
  color: var(--color-text);
}

@media (max-width: 760px) {
  .grid.two, .grid.three, .grid.four { grid-template-columns: 1fr; }
  .touch-control, .staff-primary-action { min-height: var(--touch-target-ipad); }
}

/* ==========================
   Staff Order iPad-first redesign
   ========================== */
.staff-order-redesign {
  background:
    radial-gradient(circle at 84% 0%, rgba(217, 121, 67, .13), transparent 30%),
    var(--color-bg);
}

.staff-order-redesign .order-app-shell {
  width: min(1180px, 100%);
  padding-bottom: calc(128px + env(safe-area-inset-bottom));
}

.staff-order-redesign .order-app-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--space-4);
  align-items: center;
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--color-border);
}

.staff-order-redesign .staff-back-button,
.staff-order-redesign .order-primary-action,
.staff-order-redesign .staff-start-button,
.staff-order-redesign .category-action,
.staff-order-redesign .order-submit-panel button,
.staff-order-redesign .order-success-button {
  min-height: 60px;
  border-radius: var(--radius-lg);
}

.staff-order-redesign .order-screen-heading,
.staff-order-redesign .order-list-heading,
.staff-order-redesign .category-screen-heading,
.staff-order-redesign .order-confirm-screen > h1 {
  margin-top: var(--space-6);
}

.staff-order-redesign .order-screen-heading h1,
.staff-order-redesign .order-list-heading h1,
.staff-order-redesign .category-screen-heading h1,
.staff-order-redesign .order-confirm-screen h1 {
  margin: var(--space-2) 0;
  color: var(--color-text);
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.04;
}

.staff-order-redesign .order-screen-heading p,
.staff-order-redesign .order-deadline-banner span,
.staff-order-redesign .category-screen-heading p,
.staff-order-redesign .order-confirm-screen > p {
  color: var(--color-text-muted);
  font-size: var(--font-size-md);
}

.staff-order-redesign .staff-category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.staff-order-redesign .product-category-card,
.staff-order-redesign .order-history-card,
.staff-order-redesign .order-recommended-panel,
.staff-order-redesign .order-new-date-panel,
.staff-order-redesign .order-recommendation-panel,
.staff-order-redesign .order-code-panel,
.staff-order-redesign .order-comment-panel,
.staff-order-redesign .product-card,
.staff-order-redesign .order-confirm-meta > div,
.staff-order-redesign .order-confirm-comment,
.staff-order-redesign .order-success-details > div,
.staff-order-redesign .order-success-comment {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  box-shadow: var(--shadow-card);
}

.staff-order-redesign .product-category-card {
  min-height: 150px;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: var(--space-4);
  padding: var(--space-5);
  border-radius: var(--radius-xl);
}

.staff-order-redesign .product-category-card .staff-start-button {
  grid-column: 1 / -1;
  width: 100%;
}

.staff-order-redesign .product-category-card h2,
.staff-order-redesign .product-card h2,
.staff-order-redesign .order-product-name strong {
  color: var(--color-text);
}

.staff-order-redesign .order-dashboard-grid {
  align-items: start;
}

.staff-order-redesign .calendar-date-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-3);
}

.staff-order-redesign .calendar-date-links a,
.staff-order-redesign .order-chip {
  min-height: var(--touch-target-ipad);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-lg);
  background: var(--color-bg-soft);
  color: var(--color-text);
  font-weight: 900;
}

.staff-order-redesign .order-chip.active {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: #100e0d;
}

.staff-order-redesign .order-live-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(84px, 1fr));
  gap: var(--space-2);
}

.staff-order-redesign .order-live-summary > div {
  min-height: 58px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg-soft);
}

.staff-order-redesign .order-live-summary strong,
.staff-order-redesign .order-summary strong {
  color: var(--color-text);
}

.staff-order-redesign .order-live-summary span,
.staff-order-redesign .order-summary span {
  color: var(--color-text-muted);
}

.staff-order-redesign .order-deadline-banner {
  border-color: var(--color-border-strong);
  background: var(--color-card);
}

.staff-order-redesign .order-state-pill,
.staff-order-redesign .order-save-state,
.staff-order-redesign .order-admin-status {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  width: max-content;
  max-width: 100%;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  background: var(--color-info-soft);
  color: #9ccbf3;
  font-size: var(--font-size-sm);
  font-weight: 900;
  white-space: nowrap;
}

.staff-order-redesign .order-save-state.saving {
  background: var(--color-warning-soft);
  color: #f2ce76;
}

.staff-order-redesign .order-save-state.error {
  background: var(--color-danger-soft);
  color: #f1a098;
}

.staff-order-redesign .staff-product-grid {
  display: grid;
  gap: var(--space-4);
}

.staff-order-redesign .order-product-head {
  display: none;
}

.staff-order-redesign .order-group-block {
  display: grid;
  gap: var(--space-3);
}

.staff-order-redesign .order-group-head {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: var(--space-3) 0;
  background: linear-gradient(180deg, var(--color-bg) 70%, rgba(20, 18, 16, 0));
}

.staff-order-redesign .order-group-head strong {
  color: var(--color-text);
  font-size: var(--font-size-lg);
}

.staff-order-redesign .product-card {
  min-height: 148px;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) minmax(210px, auto) minmax(210px, auto) 72px;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-5);
  border-radius: var(--radius-xl);
}

.staff-order-redesign .product-card.selected {
  border-color: color-mix(in srgb, var(--color-accent) 58%, var(--color-border));
  background: var(--color-card-hover);
}

.staff-order-redesign .order-product-code {
  display: grid;
  place-items: center;
  min-width: 58px;
  min-height: 58px;
  border-radius: var(--radius-lg);
  background: var(--color-bg-soft);
  color: var(--color-accent-hover);
  font-weight: 950;
}

.staff-order-redesign .order-product-name {
  gap: var(--space-2);
}

.staff-order-redesign .order-product-name small,
.staff-order-redesign .order-recommendation-note,
.staff-order-redesign .category-search-hint,
.staff-order-redesign .order-history-main small,
.staff-order-redesign .order-history-main p,
.staff-order-redesign .order-recommendation-list li {
  color: var(--color-text-muted);
}

.staff-order-redesign .order-recommendation-badge {
  width: max-content;
  max-width: 100%;
  padding: 5px 9px;
  border-radius: var(--radius-pill);
  background: var(--color-success-soft);
  color: #8ce0aa;
  font-size: var(--font-size-sm);
  font-weight: 900;
}

.staff-order-redesign .quantity-control {
  min-width: 0;
  background: var(--color-bg-soft);
  border-color: var(--color-border-strong);
  border-radius: var(--radius-lg);
}

.staff-order-redesign .quantity-control button,
.staff-order-redesign .quantity-control input,
.staff-order-redesign .category-step {
  min-width: var(--touch-target-ipad);
  min-height: var(--touch-target-ipad);
  border-radius: var(--radius-md);
}

.staff-order-redesign .quantity-control input {
  background: var(--color-card);
  color: var(--color-text);
  border-color: var(--color-border);
  font-size: 22px;
}

.staff-order-redesign .quantity-control button,
.staff-order-redesign .category-step.plus {
  background: var(--color-accent);
  color: #100e0d;
  border-color: var(--color-accent);
}

.staff-order-redesign .quantity-control button[data-delta="-1"],
.staff-order-redesign .category-step.minus {
  background: var(--color-bg-soft);
  color: var(--color-text);
  border-color: var(--color-border-strong);
}

.staff-order-redesign .row-total,
.staff-order-redesign .product-total,
.staff-order-redesign .category-quantity {
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

.staff-order-redesign .bottom-action-bar,
.staff-order-redesign .order-list-footer,
.staff-order-redesign .category-action-bar,
.staff-order-redesign .order-submit-panel {
  border: 1px solid var(--color-border-strong);
  background: rgba(20, 18, 16, .93);
  box-shadow: var(--shadow-elevated);
  backdrop-filter: blur(16px);
}

.staff-order-redesign .order-list-footer {
  min-height: 88px;
  padding: var(--space-3) max(18px, calc((100vw - 1180px) / 2));
}

.staff-order-redesign .button.secondary.danger,
.staff-order-redesign .secondary.danger {
  background: var(--color-danger-soft);
  color: #f1a098;
  border-color: color-mix(in srgb, var(--color-danger) 55%, var(--color-border));
}

.staff-order-redesign .category-product-card {
  min-height: 150px;
  grid-template-columns: minmax(0, 1fr) minmax(420px, auto);
  background: var(--color-card);
  border-color: var(--color-border);
}

.staff-order-redesign .category-product-card.selected {
  border-color: color-mix(in srgb, var(--color-accent) 58%, var(--color-border));
  background: var(--color-card-hover);
}

.staff-order-redesign .category-split-counters {
  gap: var(--space-3);
}

.staff-order-redesign .counter-block span {
  color: var(--color-text-muted);
}

.staff-order-redesign .order-confirm-screen {
  width: min(960px, 100%);
}

.staff-order-redesign .order-confirm-meta {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.staff-order-redesign .order-confirm-list {
  margin-bottom: var(--space-6);
}

.staff-order-redesign .order-confirm-product {
  min-height: 58px;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-card);
}

.staff-order-redesign .order-submit-panel {
  position: sticky;
  bottom: max(18px, env(safe-area-inset-bottom));
}

.staff-order-redesign .order-success-card {
  width: min(780px, 100%);
  padding: var(--space-6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-card);
  box-shadow: var(--shadow-card);
}

@media (max-width: 1100px) {
  .staff-order-redesign .product-card {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .staff-order-redesign .quantity-control,
  .staff-order-redesign .row-total {
    grid-column: 1 / -1;
  }

  .staff-order-redesign .category-product-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .staff-order-redesign .order-app-header,
  .staff-order-redesign .staff-category-grid,
  .staff-order-redesign .order-confirm-meta,
  .staff-order-redesign .category-split-counters,
  .staff-order-redesign .order-submit-panel,
  .staff-order-redesign .category-action-bar {
    grid-template-columns: 1fr;
  }

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

  .staff-order-redesign .order-list-footer {
    align-items: stretch;
  }

  .staff-order-redesign .order-list-footer > div,
  .staff-order-redesign .order-list-footer form,
  .staff-order-redesign .order-list-footer a {
    width: 100%;
  }
}

/* ==========================
   Staff Delivery iPad-first redesign
   ========================== */
.staff-delivery-redesign {
  background:
    radial-gradient(circle at 82% 0%, rgba(104, 168, 232, .12), transparent 30%),
    var(--color-bg);
}

.staff-delivery-redesign .delivery-shell,
.staff-delivery-redesign .receiving-shell {
  width: min(1180px, 100%);
  max-width: 1180px;
  padding-bottom: calc(128px + env(safe-area-inset-bottom));
}

.staff-delivery-redesign .delivery-header-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-card);
  box-shadow: var(--shadow-card);
}

.staff-delivery-redesign .staff-back-button,
.staff-delivery-redesign .staff-result-button,
.staff-delivery-redesign .problem-submit {
  min-height: 60px;
  border-radius: var(--radius-lg);
}

.staff-delivery-redesign .delivery-context {
  display: grid;
  grid-template-columns: repeat(2, minmax(130px, 1fr));
  gap: var(--space-2);
}

.staff-delivery-redesign .delivery-context > div,
.staff-delivery-redesign .receiving-order-grid > div,
.staff-delivery-redesign .receiving-stat,
.staff-delivery-redesign .receiving-live-card,
.staff-delivery-redesign .order-success-details > div {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg-soft);
  color: var(--color-text);
}

.staff-delivery-redesign .delivery-context small,
.staff-delivery-redesign .receiving-order-grid span,
.staff-delivery-redesign .receiving-stat span,
.staff-delivery-redesign .receiving-fact-field span,
.staff-delivery-redesign .receiving-comment-field span,
.staff-delivery-redesign .receiving-live-card span,
.staff-delivery-redesign .order-success-details span {
  color: var(--color-text-muted);
}

.staff-delivery-redesign .delivery-content h1,
.staff-delivery-redesign .problem-content h1,
.staff-delivery-redesign .staff-result-card h1 {
  margin: var(--space-2) 0 var(--space-4);
  color: var(--color-text);
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.04;
}

.staff-delivery-redesign .delivery-content > .eyebrow,
.staff-delivery-redesign .problem-content > .eyebrow {
  margin-top: var(--space-6);
}

.staff-delivery-redesign .receiving-order-panel,
.staff-delivery-redesign .receiving-table-panel,
.staff-delivery-redesign .receiving-comment-panel,
.staff-delivery-redesign .problem-form,
.staff-delivery-redesign .delivery-empty,
.staff-delivery-redesign .staff-result-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-card);
  box-shadow: var(--shadow-card);
  color: var(--color-text);
}

.staff-delivery-redesign .delivery-summary-card {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4);
}

.staff-delivery-redesign .receiving-live-card {
  min-height: 118px;
  display: grid;
  align-content: center;
  gap: var(--space-2);
  padding: var(--space-5);
}

.staff-delivery-redesign .receiving-live-card strong {
  color: var(--color-text);
  font-size: clamp(34px, 5vw, 52px);
}

.staff-delivery-redesign .receiving-card-list {
  gap: var(--space-4);
  padding: var(--space-4);
}

.staff-delivery-redesign .delivery-item-card {
  gap: var(--space-4);
  padding: var(--space-5);
  border-color: var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-card);
}

.staff-delivery-redesign .delivery-item-card.has-issue {
  border-color: color-mix(in srgb, var(--color-danger) 58%, var(--color-border));
  background: var(--color-danger-soft);
}

.staff-delivery-redesign .receiving-card-head strong {
  color: var(--color-text);
  font-size: clamp(24px, 3vw, 34px);
}

.staff-delivery-redesign .receiving-code {
  min-height: 34px;
  align-items: center;
  background: var(--color-bg-soft);
  color: var(--color-accent-hover);
}

.staff-delivery-redesign .receiving-status {
  min-height: 42px;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
}

.staff-delivery-redesign .receiving-status.status-ok {
  background: var(--color-success-soft);
  color: #8ce0aa;
}

.staff-delivery-redesign .receiving-status.status-issue {
  background: var(--color-danger-soft);
  color: #f1a098;
}

.staff-delivery-redesign .receiving-status.status-over {
  background: var(--color-warning-soft);
  color: #f2ce76;
}

.staff-delivery-redesign .receiving-card-grid {
  grid-template-columns: 140px minmax(240px, 1fr) minmax(220px, 280px) 140px;
  gap: var(--space-4);
}

.staff-delivery-redesign .receiving-stat strong,
.staff-delivery-redesign .diff-cell {
  color: var(--color-text);
  font-size: 32px;
}

.staff-delivery-redesign .receiving-input,
.staff-delivery-redesign .receiving-comment,
.staff-delivery-redesign .receiving-reason,
.staff-delivery-redesign .problem-form input,
.staff-delivery-redesign .problem-form select,
.staff-delivery-redesign .problem-form textarea,
.staff-delivery-redesign .receiving-comment-panel textarea {
  min-height: var(--touch-target-ipad);
  border-color: var(--color-border-strong);
  border-radius: var(--radius-lg);
  background: var(--color-bg-soft);
  color: var(--color-text);
}

.staff-delivery-redesign .receiving-input {
  font-size: 28px;
}

.staff-delivery-redesign .receiving-quick-button {
  min-height: 62px;
  border-radius: var(--radius-lg);
  background: var(--color-success-soft);
  border-color: color-mix(in srgb, var(--color-success) 52%, var(--color-border));
  color: #a6e8bb;
  font-size: var(--font-size-md);
}

.staff-delivery-redesign .receiving-quick-button.danger {
  background: var(--color-danger-soft);
  border-color: color-mix(in srgb, var(--color-danger) 52%, var(--color-border));
  color: #f1a098;
}

.staff-delivery-redesign .warning-block {
  border-color: color-mix(in srgb, var(--color-warning) 38%, var(--color-border));
}

.staff-delivery-redesign .receiving-actions.bottom-action-bar {
  position: sticky;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 18;
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(260px, 1.2fr);
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-xl);
  background: rgba(20, 18, 16, .93);
  box-shadow: var(--shadow-elevated);
  backdrop-filter: blur(16px);
}

.staff-delivery-redesign .delivery-action {
  min-height: 68px;
  border-radius: var(--radius-lg);
  font-size: var(--font-size-md);
}

.staff-delivery-redesign .delivery-action.problem {
  background: var(--color-bg-soft);
  border-color: var(--color-border-strong);
  color: var(--color-text);
}

.staff-delivery-redesign .delivery-action.confirm {
  background: var(--color-success);
  color: #07120b;
}

.staff-delivery-redesign .delivery-empty {
  min-height: 320px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: var(--space-3);
  padding: var(--space-6);
  text-align: center;
}

.staff-delivery-redesign .confirm-block {
  display: grid;
  gap: var(--space-5);
  padding: var(--space-6);
}

.staff-delivery-redesign .problem-submit {
  background: var(--color-danger);
  color: #130b09;
  font-weight: 900;
}

@media (max-width: 1050px) {
  .staff-delivery-redesign .delivery-header-card,
  .staff-delivery-redesign .delivery-summary-card,
  .staff-delivery-redesign .receiving-card-grid,
  .staff-delivery-redesign .receiving-actions.bottom-action-bar {
    grid-template-columns: 1fr;
  }

  .staff-delivery-redesign .delivery-context,
  .staff-delivery-redesign .receiving-order-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .staff-delivery-redesign .delivery-context,
  .staff-delivery-redesign .receiving-order-grid {
    grid-template-columns: 1fr;
  }

  .staff-delivery-redesign .receiving-card-head {
    display: grid;
  }
}

/* ==========================
   Staff Cash iPad-first redesign
   ========================== */
.staff-cash-redesign {
  background:
    radial-gradient(circle at 82% 0%, rgba(79, 180, 119, .13), transparent 30%),
    var(--color-bg);
}

.staff-cash-redesign .cash-staff-shell {
  width: min(1180px, 100%);
  padding-bottom: calc(132px + env(safe-area-inset-bottom));
}

.staff-cash-redesign .cash-header-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-card);
  box-shadow: var(--shadow-card);
}

.staff-cash-redesign .staff-back-button,
.staff-cash-redesign .cash-complete-button,
.staff-cash-redesign .cash-photo-upload button,
.staff-cash-redesign .cash-confirmation button {
  min-height: 60px;
  border-radius: var(--radius-lg);
}

.staff-cash-redesign .cash-save-state {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  background: var(--color-info-soft);
  color: #9ccbf3;
  font-size: var(--font-size-sm);
  font-weight: 900;
  white-space: nowrap;
}

.staff-cash-redesign .cash-save-state:has(+ *) {
  color: #9ccbf3;
}

.staff-cash-redesign .cash-staff-screen {
  display: grid;
  gap: var(--space-5);
}

.staff-cash-redesign .cash-staff-screen > h1 {
  margin: var(--space-2) 0 0;
  color: var(--color-text);
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.04;
}

.staff-cash-redesign .cash-context.cash-summary-card,
.staff-cash-redesign .cash-live-totals.cash-summary-card,
.staff-cash-redesign .photo-block,
.staff-cash-redesign .warning-block,
.staff-cash-redesign .cash-input-card,
.staff-cash-redesign .cash-confirmation.confirm-block {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-card);
  color: var(--color-text);
  box-shadow: var(--shadow-card);
}

.staff-cash-redesign .cash-context.cash-summary-card {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-3);
  margin-bottom: 0;
  padding: var(--space-3);
}

.staff-cash-redesign .cash-context.cash-summary-card > div {
  min-height: 92px;
  display: grid;
  align-content: center;
  border-color: var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg-soft);
}

.staff-cash-redesign .cash-context span,
.staff-cash-redesign .cash-live-totals span,
.staff-cash-redesign .cash-photo-section p,
.staff-cash-redesign .cash-photo-list small {
  color: var(--color-text-muted);
}

.staff-cash-redesign .cash-context strong,
.staff-cash-redesign .cash-live-totals strong,
.staff-cash-redesign .cash-photo-list strong {
  color: var(--color-text);
}

.staff-cash-redesign .cash-input-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}

.staff-cash-redesign .cash-input-card {
  gap: var(--space-3);
  min-height: 142px;
  padding: var(--space-5);
  color: var(--color-text-muted);
}

.staff-cash-redesign .money-input input {
  min-height: 76px;
  border-color: var(--color-border-strong);
  border-radius: var(--radius-lg);
  background: var(--color-bg-soft);
  color: var(--color-text);
  font-size: clamp(28px, 4vw, 40px);
}

.staff-cash-redesign .money-input span {
  color: var(--color-accent-hover);
  font-size: var(--font-size-lg);
}

.staff-cash-redesign .cash-live-totals.cash-summary-card {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-3);
  padding: var(--space-3);
}

.staff-cash-redesign .cash-live-totals > div {
  min-height: 112px;
  display: grid;
  align-content: center;
  gap: var(--space-2);
  padding: var(--space-4);
  border-color: var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg-soft);
}

.staff-cash-redesign .cash-live-totals > div.main {
  border-color: color-mix(in srgb, var(--color-success) 45%, var(--color-border));
  background: var(--color-success-soft);
}

.staff-cash-redesign .cash-live-totals strong {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.05;
}

.staff-cash-redesign .cash-text-grid.warning-block {
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-top: 0;
  padding: var(--space-5);
  border-color: color-mix(in srgb, var(--color-warning) 36%, var(--color-border));
}

.staff-cash-redesign .cash-text-grid textarea {
  min-height: 116px;
  border-color: var(--color-border-strong);
  border-radius: var(--radius-lg);
  background: var(--color-bg-soft);
  color: var(--color-text);
  font-size: var(--font-size-md);
}

.staff-cash-redesign .cash-inline-error.warning-block {
  margin-top: 0;
  padding: var(--space-4);
  border-color: color-mix(in srgb, var(--color-danger) 45%, var(--color-border));
  background: var(--color-danger-soft);
  color: #f1a098;
}

.staff-cash-redesign .cash-complete-zone.bottom-action-bar {
  position: sticky;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 18;
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-4);
  padding: var(--space-3);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-xl);
  background: rgba(20, 18, 16, .93);
  box-shadow: var(--shadow-elevated);
  backdrop-filter: blur(16px);
}

.staff-cash-redesign .cash-complete-button {
  background: var(--color-success);
  color: #07120b;
  font-size: var(--font-size-md);
}

.staff-cash-redesign .cash-confirmation.confirm-block {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-5);
  border-color: color-mix(in srgb, var(--color-accent) 48%, var(--color-border));
}

.staff-cash-redesign .cash-confirmation p {
  color: var(--color-text-muted);
}

.staff-cash-redesign .cash-confirmation > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.staff-cash-redesign .photo-block {
  margin-top: 0;
  padding: var(--space-5);
  border-top: 0;
}

.staff-cash-redesign .cash-photo-upload {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-3);
}

.staff-cash-redesign .cash-photo-upload input {
  min-height: 60px;
  border-color: var(--color-border-strong);
  border-radius: var(--radius-lg);
  background: var(--color-bg-soft);
  color: var(--color-text);
}

.staff-cash-redesign .cash-photo-upload button {
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border-strong);
  color: var(--color-text);
  font-weight: 900;
}

.staff-cash-redesign .cash-photo-list > div {
  min-height: 58px;
  border-color: var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg-soft);
}

@media (max-width: 1050px) {
  .staff-cash-redesign .cash-header-card,
  .staff-cash-redesign .cash-context.cash-summary-card,
  .staff-cash-redesign .cash-input-grid,
  .staff-cash-redesign .cash-live-totals.cash-summary-card,
  .staff-cash-redesign .cash-text-grid.warning-block,
  .staff-cash-redesign .cash-photo-upload,
  .staff-cash-redesign .cash-confirmation > div {
    grid-template-columns: 1fr;
  }
}

/* Staff iPad readability patch: keep light cards readable on cream/white surfaces. */
.staff-home-redesign,
.staff-order-redesign,
.staff-delivery-redesign,
.staff-cash-redesign {
  --staff-readable-text: #241f1a;
  --staff-readable-muted: #5f5248;
  --staff-readable-soft: #786b60;
  --staff-readable-accent: #9b4822;
  --staff-readable-success: #1f6d3e;
  --staff-readable-warning: #8a5b13;
  --staff-readable-danger: #9b332b;
  --staff-readable-info: #245f8f;
}

.staff-home-redesign .staff-home-day,
.staff-home-redesign .staff-home-intro,
.staff-home-redesign .staff-home-progress-card,
.staff-home-redesign .staff-next-task,
.staff-home-redesign .staff-home-summary-card,
.staff-home-redesign .staff-home-task-card,
.staff-home-redesign .staff-home-empty,
.staff-order-redesign .product-category-card,
.staff-order-redesign .order-history-card,
.staff-order-redesign .order-recommended-panel,
.staff-order-redesign .order-new-date-panel,
.staff-order-redesign .order-recommendation-panel,
.staff-order-redesign .order-code-panel,
.staff-order-redesign .order-comment-panel,
.staff-order-redesign .product-card,
.staff-order-redesign .order-confirm-meta > div,
.staff-order-redesign .order-confirm-comment,
.staff-order-redesign .order-success-details > div,
.staff-order-redesign .order-success-comment,
.staff-order-redesign .order-live-summary > div,
.staff-order-redesign .order-deadline-banner,
.staff-order-redesign .category-product-card,
.staff-order-redesign .order-confirm-product,
.staff-order-redesign .order-success-card,
.staff-delivery-redesign .delivery-header-card,
.staff-delivery-redesign .delivery-context > div,
.staff-delivery-redesign .receiving-order-grid > div,
.staff-delivery-redesign .receiving-stat,
.staff-delivery-redesign .receiving-live-card,
.staff-delivery-redesign .order-success-details > div,
.staff-delivery-redesign .receiving-order-panel,
.staff-delivery-redesign .receiving-table-panel,
.staff-delivery-redesign .receiving-comment-panel,
.staff-delivery-redesign .problem-form,
.staff-delivery-redesign .delivery-empty,
.staff-delivery-redesign .staff-result-card,
.staff-delivery-redesign .delivery-item-card,
.staff-cash-redesign .cash-header-card,
.staff-cash-redesign .cash-context.cash-summary-card,
.staff-cash-redesign .cash-context.cash-summary-card > div,
.staff-cash-redesign .cash-live-totals.cash-summary-card,
.staff-cash-redesign .cash-live-totals > div,
.staff-cash-redesign .photo-block,
.staff-cash-redesign .warning-block,
.staff-cash-redesign .cash-input-card,
.staff-cash-redesign .cash-confirmation.confirm-block,
.staff-cash-redesign .cash-photo-list > div {
  color: var(--staff-readable-text);
}

.staff-home-redesign .staff-home-day span,
.staff-home-redesign .staff-home-summary-card span,
.staff-home-redesign .staff-home-intro p,
.staff-home-redesign .staff-next-task p,
.staff-home-redesign .staff-next-task-meta,
.staff-home-redesign .staff-home-summary-card p,
.staff-home-redesign .task-copy p,
.staff-home-redesign .task-status,
.staff-order-redesign .order-screen-heading p,
.staff-order-redesign .order-deadline-banner span,
.staff-order-redesign .category-screen-heading p,
.staff-order-redesign .order-confirm-screen > p,
.staff-order-redesign .order-live-summary span,
.staff-order-redesign .order-summary span,
.staff-order-redesign .order-product-name small,
.staff-order-redesign .order-recommendation-note,
.staff-order-redesign .category-search-hint,
.staff-order-redesign .order-history-main small,
.staff-order-redesign .order-history-main p,
.staff-order-redesign .order-recommendation-list li,
.staff-order-redesign .counter-block span,
.staff-delivery-redesign .delivery-context small,
.staff-delivery-redesign .receiving-order-grid span,
.staff-delivery-redesign .receiving-stat span,
.staff-delivery-redesign .receiving-fact-field span,
.staff-delivery-redesign .receiving-comment-field span,
.staff-delivery-redesign .receiving-live-card span,
.staff-delivery-redesign .order-success-details span,
.staff-cash-redesign .cash-context span,
.staff-cash-redesign .cash-live-totals span,
.staff-cash-redesign .cash-photo-section p,
.staff-cash-redesign .cash-photo-list small,
.staff-cash-redesign .cash-confirmation p {
  color: var(--staff-readable-muted);
  opacity: 1;
}

.staff-home-redesign .staff-home-day strong,
.staff-home-redesign .staff-home-summary-card strong,
.staff-home-redesign .staff-next-task h2,
.staff-home-redesign .task-copy h2,
.staff-order-redesign .product-category-card h2,
.staff-order-redesign .product-card h2,
.staff-order-redesign .order-product-name strong,
.staff-order-redesign .order-live-summary strong,
.staff-order-redesign .order-summary strong,
.staff-order-redesign .order-group-head strong,
.staff-order-redesign .row-total,
.staff-order-redesign .product-total,
.staff-order-redesign .category-quantity,
.staff-delivery-redesign .receiving-live-card strong,
.staff-delivery-redesign .receiving-card-head strong,
.staff-delivery-redesign .receiving-stat strong,
.staff-delivery-redesign .diff-cell,
.staff-cash-redesign .cash-context strong,
.staff-cash-redesign .cash-live-totals strong,
.staff-cash-redesign .cash-photo-list strong {
  color: var(--staff-readable-text);
  opacity: 1;
}

.staff-home-redesign .task-status,
.staff-home-redesign .task-status.locked,
.staff-home-redesign .task-card.locked .task-status,
.staff-home-redesign .locked-task .task-status {
  color: var(--staff-readable-warning);
}

.staff-home-redesign .task-status.completed {
  color: var(--staff-readable-success);
}

.staff-home-redesign .task-status.overdue {
  color: var(--staff-readable-danger);
}

.staff-home-redesign .locked-task,
.staff-home-redesign .task-card.locked {
  opacity: 1;
}

.staff-home-redesign .task-status i {
  background: var(--staff-readable-warning);
}

.staff-home-redesign .task-status.completed i {
  background: var(--staff-readable-success);
}

.staff-home-redesign .task-status.overdue i {
  background: var(--staff-readable-danger);
}

.staff-home-redesign .task-status.locked i,
.staff-home-redesign .locked-task .task-status i {
  background: #8d8177;
}

.staff-order-redesign .order-product-code,
.staff-delivery-redesign .receiving-code,
.staff-cash-redesign .money-input span {
  color: var(--staff-readable-accent);
}

.staff-order-redesign .order-state-pill,
.staff-order-redesign .order-save-state,
.staff-order-redesign .order-admin-status,
.staff-cash-redesign .cash-save-state,
.staff-cash-redesign .cash-save-state:has(+ *) {
  color: var(--staff-readable-info);
}

.staff-order-redesign .order-save-state.saving {
  color: var(--staff-readable-warning);
}

.staff-order-redesign .order-save-state.error {
  color: var(--staff-readable-danger);
}

.staff-order-redesign .order-recommendation-badge,
.staff-delivery-redesign .receiving-status.status-ok,
.staff-delivery-redesign .receiving-quick-button {
  color: var(--staff-readable-success);
}

.staff-delivery-redesign .delivery-item-card.has-issue,
.staff-cash-redesign .cash-inline-error.warning-block {
  color: var(--staff-readable-text);
}

.staff-delivery-redesign .receiving-status.status-issue,
.staff-delivery-redesign .receiving-quick-button.danger,
.staff-cash-redesign .cash-inline-error.warning-block {
  color: var(--staff-readable-danger);
}

.staff-delivery-redesign .receiving-status.status-over {
  color: var(--staff-readable-warning);
}

/* Staff contrast fix: readable text across dark staff pages and light work cards. */
.staff-work-body,
.staff-page,
.staff-home-redesign,
.staff-order-redesign,
.staff-delivery-redesign,
.staff-cash-redesign {
  --staff-dark-text: #f8f1e8;
  --staff-dark-muted: #d8cbbf;
  --staff-dark-soft: #bfae9f;
  --staff-light-text: #211c17;
  --staff-light-muted: #5e5147;
  --staff-light-soft: #776a5f;
  --staff-light-bg: #fffaf5;
  --staff-light-bg-soft: #f3ebe4;
  --staff-light-border: #d8c8bb;
  --staff-status-success: #1f6d3e;
  --staff-status-warning: #875611;
  --staff-status-danger: #963028;
  --staff-status-info: #245d8a;
}

.staff-work-body,
.staff-page,
.staff-work-shell,
.staff-home-redesign,
.staff-order-redesign,
.staff-delivery-redesign,
.staff-cash-redesign {
  color: var(--staff-dark-text);
}

.staff-work-body .staff-home-brand strong,
.staff-work-body .staff-work-header .staff-home-brand,
.staff-work-body .order-app-header h1,
.staff-work-body .delivery-header h1,
.staff-work-body .leftovers-screen > h1,
.staff-work-body .leftovers-list-head h1,
.staff-work-body .refrigerator-content > h1,
.staff-home-redesign .staff-home-bottom-action strong,
.staff-order-redesign .bottom-action-bar strong,
.staff-order-redesign .order-list-footer strong,
.staff-order-redesign .category-action-bar strong,
.staff-delivery-redesign .receiving-actions.bottom-action-bar strong,
.staff-cash-redesign .cash-complete-zone.bottom-action-bar strong {
  color: var(--staff-dark-text);
}

.staff-work-body .staff-home-brand small,
.staff-work-body .leftovers-screen > p,
.staff-work-body .leftovers-list-head p,
.staff-work-body .refrigerator-content > p,
.staff-home-redesign .staff-home-bottom-action span,
.staff-order-redesign .bottom-action-bar span,
.staff-order-redesign .order-list-footer span,
.staff-order-redesign .category-action-bar span,
.staff-delivery-redesign .receiving-actions.bottom-action-bar span,
.staff-cash-redesign .cash-complete-zone.bottom-action-bar span {
  color: var(--staff-dark-muted);
  opacity: 1;
}

.staff-work-body .eyebrow,
.staff-home-redesign .eyebrow,
.staff-order-redesign .eyebrow,
.staff-delivery-redesign .eyebrow,
.staff-cash-redesign .eyebrow {
  color: #e6a36f;
}

.staff-work-body .leftovers-date {
  background: var(--staff-light-bg-soft);
  color: var(--staff-light-text);
  border: 1px solid var(--staff-light-border);
}

.staff-work-body .staff-task-card,
.staff-work-body .staff-no-delivery,
.staff-work-body .leftovers-product,
.staff-work-body .leftover-product-card,
.staff-work-body .leftovers-progress,
.staff-work-body .leftovers-submit-bar,
.staff-work-body .refrigerator-card,
.staff-work-body .temperature-result,
.staff-work-body .temperature-alert-fields,
.staff-work-body .photo-picker,
.staff-work-body .quick-leftover-entry,
.staff-work-body .quick-match-row,
.staff-work-body .quick-leftover-added div,
.staff-work-body .delivery-manifest,
.staff-work-body .problem-form {
  background: var(--staff-light-bg);
  border-color: var(--staff-light-border);
  color: var(--staff-light-text);
}

.staff-work-body .leftovers-product h2,
.staff-work-body .leftover-product-main > strong,
.staff-work-body .leftovers-progress strong,
.staff-work-body .leftovers-submit-bar strong,
.staff-work-body .refrigerator-card h2,
.staff-work-body .temperature-result strong,
.staff-work-body .staff-no-delivery h2,
.staff-work-body .quick-match-row strong,
.staff-work-body .quick-leftover-added em,
.staff-work-body .task-copy h2 {
  color: var(--staff-light-text);
  opacity: 1;
}

.staff-work-body .leftovers-product small,
.staff-work-body .leftovers-product label,
.staff-work-body .leftover-product-code,
.staff-work-body .leftover-product-facts span,
.staff-work-body .reconciliation-result small,
.staff-work-body .leftover-quantity-control > label,
.staff-work-body .leftovers-progress span,
.staff-work-body .leftovers-submit-bar span,
.staff-work-body .refrigerator-card p,
.staff-work-body .temperature-result span,
.staff-work-body .temperature-result small,
.staff-work-body .photo-picker small,
.staff-work-body .quick-match-row small,
.staff-work-body .quick-leftover-added span,
.staff-work-body .quick-leftover-added small,
.staff-work-body .task-copy p {
  color: var(--staff-light-muted);
  opacity: 1;
}

.staff-work-body .leftover-product-facts span,
.staff-work-body .counter-row.staff,
.staff-work-body .task-subtask.locked,
.staff-work-body .calendar-rule-new {
  background: var(--staff-light-bg-soft);
  color: var(--staff-light-muted);
}

.staff-work-body .leftover-product-facts b,
.staff-work-body .leftovers-sold {
  color: var(--staff-status-success);
}

.staff-work-body input,
.staff-work-body select,
.staff-work-body textarea,
.staff-work-body .leftovers-product input,
.staff-work-body .leftover-quantity-control input,
.staff-work-body .temperature-form input,
.staff-work-body .temperature-form textarea,
.staff-work-body .quick-leftover-entry input,
.staff-work-body .quick-leftover-search input,
.staff-work-body .quick-match-row input,
.staff-order-redesign .quantity-control input,
.staff-delivery-redesign .receiving-input,
.staff-delivery-redesign .receiving-comment,
.staff-delivery-redesign .receiving-reason,
.staff-cash-redesign .money-input input,
.staff-cash-redesign .cash-text-grid textarea,
.staff-cash-redesign .cash-photo-upload input {
  background: #fff;
  border-color: var(--staff-light-border);
  color: var(--staff-light-text);
  opacity: 1;
}

.staff-work-body input::placeholder,
.staff-work-body textarea::placeholder,
.staff-order-redesign input::placeholder,
.staff-order-redesign textarea::placeholder,
.staff-delivery-redesign input::placeholder,
.staff-delivery-redesign textarea::placeholder,
.staff-cash-redesign input::placeholder,
.staff-cash-redesign textarea::placeholder {
  color: var(--staff-light-soft);
  opacity: 1;
}

.staff-work-body label,
.staff-order-redesign label,
.staff-delivery-redesign label,
.staff-cash-redesign label {
  color: var(--staff-light-muted);
}

.staff-work-body .status-pill,
.staff-work-body .badge,
.staff-work-body .cash-status,
.staff-work-body .temperature-state,
.staff-order-redesign .order-state-pill,
.staff-order-redesign .order-save-state,
.staff-order-redesign .order-admin-status,
.staff-delivery-redesign .receiving-status,
.staff-cash-redesign .cash-save-state {
  opacity: 1;
  font-weight: 900;
}

.staff-work-body .status-pill.success,
.staff-work-body .badge-success,
.staff-work-body .temperature-state.normal,
.staff-order-redesign .order-recommendation-badge,
.staff-delivery-redesign .receiving-status.status-ok,
.staff-delivery-redesign .receiving-quick-button,
.staff-cash-redesign .cash-live-totals > div.main {
  color: var(--staff-status-success);
}

.staff-work-body .status-pill.warning,
.staff-work-body .badge-warning,
.staff-work-body .cash-status.draft,
.staff-delivery-redesign .receiving-status.status-over,
.staff-order-redesign .order-save-state.saving {
  color: var(--staff-status-warning);
}

.staff-work-body .status-pill.danger,
.staff-work-body .status-pill.critical,
.staff-work-body .badge-danger,
.staff-work-body .temperature-state.alert,
.staff-delivery-redesign .receiving-status.status-issue,
.staff-delivery-redesign .receiving-quick-button.danger,
.staff-order-redesign .order-save-state.error,
.staff-cash-redesign .cash-inline-error.warning-block {
  color: var(--staff-status-danger);
}

.staff-work-body .status-pill.info,
.staff-work-body .badge-info,
.staff-order-redesign .order-state-pill,
.staff-order-redesign .order-save-state,
.staff-order-redesign .order-admin-status,
.staff-cash-redesign .cash-save-state {
  color: var(--staff-status-info);
}

.staff-work-body .leftover-zero,
.staff-work-body .staff-start-button.secondary-task,
.staff-work-body .staff-start-button.disabled-task,
.staff-delivery-redesign .delivery-action.problem,
.staff-cash-redesign .cash-photo-upload button {
  background: var(--staff-light-bg-soft);
  border-color: var(--staff-light-border);
  color: var(--staff-light-text);
  opacity: 1;
}

.staff-work-body .locked-task,
.staff-work-body .task-card.locked,
.staff-work-body [disabled],
.staff-work-body .disabled,
.staff-work-body .disabled-task {
  opacity: .82;
}

/* Staff readability final fixes: dark order cards must always use light text. */
.staff-order-redesign .order-product-row.product-card,
.staff-order-redesign .category-product-card.product-card,
.staff-order-redesign .product-card,
.staff-order-redesign .product-card.selected,
.staff-order-redesign .order-live-summary > div,
.staff-order-redesign .order-group-head,
.staff-order-redesign .order-list-footer,
.staff-order-redesign .order-submit-panel,
.staff-order-redesign .category-action-bar,
.staff-order-redesign .bottom-action-bar {
  color: var(--staff-dark-text);
}

.staff-order-redesign .order-product-row.product-card *,
.staff-order-redesign .category-product-card.product-card *,
.staff-order-redesign .product-card *,
.staff-order-redesign .product-card.selected *,
.staff-order-redesign .order-live-summary > div *,
.staff-order-redesign .order-list-footer *,
.staff-order-redesign .order-submit-panel *,
.staff-order-redesign .category-action-bar *,
.staff-order-redesign .bottom-action-bar * {
  opacity: 1;
}

.staff-order-redesign .order-group-head strong,
.staff-order-redesign .order-group-head span,
.staff-order-redesign .order-product-name strong,
.staff-order-redesign .product-card h2,
.staff-order-redesign .category-product-card h2,
.staff-order-redesign .product-card strong,
.staff-order-redesign .category-product-card strong,
.staff-order-redesign .order-live-summary strong,
.staff-order-redesign .order-list-footer strong,
.staff-order-redesign .order-submit-panel strong,
.staff-order-redesign .row-total,
.staff-order-redesign .product-total,
.staff-order-redesign .category-quantity,
.staff-order-redesign .order-confirm-product strong,
.staff-order-redesign .order-success-card strong {
  color: var(--staff-dark-text);
}

.staff-order-redesign .order-product-name small,
.staff-order-redesign .order-recommendation-note,
.staff-order-redesign .category-search-hint,
.staff-order-redesign .order-history-main small,
.staff-order-redesign .order-history-main p,
.staff-order-redesign .order-recommendation-list li,
.staff-order-redesign .order-live-summary span,
.staff-order-redesign .order-list-footer span,
.staff-order-redesign .order-submit-panel span,
.staff-order-redesign .counter-block span,
.staff-order-redesign .order-confirm-product small,
.staff-order-redesign .order-success-card small,
.staff-order-redesign .order-success-comment,
.staff-order-redesign .order-confirm-comment {
  color: var(--staff-dark-muted);
}

.staff-order-redesign .order-product-code {
  background: rgba(255, 250, 245, .1);
  border: 1px solid rgba(248, 241, 232, .18);
  color: #f0b487;
}

.staff-order-redesign .order-recommendation-badge,
.staff-order-redesign .order-state-pill,
.staff-order-redesign .order-save-state,
.staff-order-redesign .order-admin-status {
  background: rgba(255, 250, 245, .12);
  border: 1px solid rgba(248, 241, 232, .18);
  color: var(--staff-dark-text);
}

.staff-order-redesign .order-recommendation-badge.confidence-low,
.staff-order-redesign .order-save-state.saving {
  color: #f7d28c;
}

.staff-order-redesign .order-save-state.error {
  color: #ffb8b0;
}

.staff-order-redesign .quantity-control,
.staff-order-redesign .category-split-counters,
.staff-order-redesign .counter-block {
  color: var(--staff-dark-text);
}

.staff-order-redesign .quantity-control input,
.staff-order-redesign .category-product-card input {
  background: #fff;
  color: var(--staff-light-text);
}

.staff-order-redesign .button.secondary.danger,
.staff-order-redesign .secondary.danger,
.staff-order-redesign .order-list-footer .button,
.staff-order-redesign .order-submit-panel a {
  color: var(--staff-dark-text);
}

.staff-work-body .leftovers-product,
.staff-work-body .leftover-product-card,
.staff-work-body .refrigerator-card {
  color: var(--staff-light-text);
}

.staff-work-body .leftovers-product h2,
.staff-work-body .leftover-product-main > strong,
.staff-work-body .refrigerator-card h2 {
  color: var(--staff-light-text);
}

.staff-work-body .leftovers-product small,
.staff-work-body .leftovers-product label,
.staff-work-body .leftover-product-code,
.staff-work-body .refrigerator-card p {
  color: var(--staff-light-muted);
}

/* Staff dark theme unification: keep Staff as one dark iPad app. */
.staff-work-body,
.staff-result-body,
.staff-page,
.staff-home-redesign,
.staff-order-redesign,
.staff-delivery-redesign,
.staff-cash-redesign {
  --staff-bg: #14110f;
  --staff-surface: #211b17;
  --staff-surface-2: #2b231d;
  --staff-surface-3: #352a22;
  --staff-border: rgba(248, 226, 204, .14);
  --staff-border-strong: rgba(248, 226, 204, .26);
  --staff-text: #fff7ec;
  --staff-text-muted: #dccbbd;
  --staff-text-soft: #bca99a;
  --staff-accent: #df6b33;
  --staff-accent-hover: #f08344;
  --staff-danger: #ff9a8d;
  --staff-success: #7ad49a;
  --staff-warning: #f5c36f;
  background:
    radial-gradient(circle at 12% 0%, rgba(223, 107, 51, .12), transparent 34%),
    linear-gradient(180deg, #18130f 0%, var(--staff-bg) 48%, #100d0b 100%);
  color: var(--staff-text);
}

.staff-work-body .staff-work-shell,
.staff-home-redesign .staff-home-shell,
.staff-order-redesign .order-staff-shell,
.staff-delivery-redesign .delivery-shell,
.staff-cash-redesign .cash-staff-shell {
  color: var(--staff-text);
}

.staff-work-body h1,
.staff-work-body h2,
.staff-work-body h3,
.staff-work-body h4,
.staff-work-body strong,
.staff-work-body .title,
.staff-work-body .name,
.staff-work-body .staff-home-brand strong,
.staff-work-body .order-app-header h1,
.staff-work-body .delivery-header h1,
.staff-work-body .leftovers-screen > h1,
.staff-work-body .leftovers-list-head h1,
.staff-work-body .refrigerator-content > h1,
.staff-home-redesign .staff-next-task h2,
.staff-home-redesign .task-copy h2,
.staff-order-redesign .order-screen-heading h1,
.staff-order-redesign .category-screen-heading h1,
.staff-order-redesign .product-category-card h2,
.staff-order-redesign .product-card h2,
.staff-order-redesign .order-product-name strong,
.staff-delivery-redesign .receiving-card-head strong,
.staff-cash-redesign .cash-staff-screen > h1 {
  color: var(--staff-text);
  opacity: 1;
}

.staff-work-body p,
.staff-work-body small,
.staff-work-body span,
.staff-work-body label,
.staff-work-body .meta,
.staff-work-body .hint,
.staff-work-body .muted,
.staff-work-body .staff-home-brand small,
.staff-home-redesign .staff-home-intro p,
.staff-home-redesign .staff-next-task p,
.staff-home-redesign .staff-next-task-meta,
.staff-home-redesign .task-copy p,
.staff-order-redesign .order-screen-heading p,
.staff-order-redesign .category-screen-heading p,
.staff-order-redesign .order-product-name small,
.staff-order-redesign .order-recommendation-note,
.staff-order-redesign .order-history-main p,
.staff-order-redesign .order-history-main small,
.staff-order-redesign .order-recommendation-list li,
.staff-delivery-redesign .delivery-context small,
.staff-delivery-redesign .receiving-order-grid span,
.staff-delivery-redesign .receiving-stat span,
.staff-delivery-redesign .receiving-fact-field span,
.staff-delivery-redesign .receiving-comment-field span,
.staff-cash-redesign .cash-context span,
.staff-cash-redesign .cash-live-totals span,
.staff-cash-redesign .cash-photo-section p,
.staff-cash-redesign .cash-photo-list small {
  color: var(--staff-text-muted);
  opacity: 1;
}

.staff-work-body .staff-task-card,
.staff-work-body .staff-no-delivery,
.staff-work-body .summary-card,
.staff-work-body .panel,
.staff-work-body .task-card,
.staff-work-body .delivery-manifest,
.staff-work-body .problem-form,
.staff-work-body .leftovers-product,
.staff-work-body .leftover-product-card,
.staff-work-body .leftovers-progress,
.staff-work-body .leftovers-submit-bar,
.staff-work-body .refrigerator-card,
.staff-work-body .temperature-result,
.staff-work-body .temperature-alert-fields,
.staff-work-body .photo-picker,
.staff-work-body .quick-leftover-entry,
.staff-work-body .quick-match-row,
.staff-work-body .quick-leftover-added div,
.staff-home-redesign .staff-home-day,
.staff-home-redesign .staff-home-intro,
.staff-home-redesign .staff-home-progress-card,
.staff-home-redesign .staff-next-task,
.staff-home-redesign .staff-home-summary-card,
.staff-home-redesign .staff-home-task-card,
.staff-home-redesign .staff-home-empty,
.staff-order-redesign .product-category-card,
.staff-order-redesign .order-history-card,
.staff-order-redesign .order-recommended-panel,
.staff-order-redesign .order-new-date-panel,
.staff-order-redesign .order-recommendation-panel,
.staff-order-redesign .order-code-panel,
.staff-order-redesign .order-comment-panel,
.staff-order-redesign .product-card,
.staff-order-redesign .order-confirm-meta > div,
.staff-order-redesign .order-confirm-comment,
.staff-order-redesign .order-success-details > div,
.staff-order-redesign .order-success-comment,
.staff-order-redesign .order-live-summary > div,
.staff-order-redesign .order-deadline-banner,
.staff-order-redesign .category-product-card,
.staff-order-redesign .order-confirm-product,
.staff-order-redesign .order-success-card,
.staff-order-redesign .order-submit-panel,
.staff-delivery-redesign .delivery-header-card,
.staff-delivery-redesign .delivery-context > div,
.staff-delivery-redesign .delivery-summary-card,
.staff-delivery-redesign .receiving-order-grid > div,
.staff-delivery-redesign .receiving-stat,
.staff-delivery-redesign .receiving-live-card,
.staff-delivery-redesign .order-success-details > div,
.staff-delivery-redesign .receiving-order-panel,
.staff-delivery-redesign .receiving-table-panel,
.staff-delivery-redesign .receiving-comment-panel,
.staff-delivery-redesign .problem-form,
.staff-delivery-redesign .delivery-empty,
.staff-delivery-redesign .staff-result-card,
.staff-delivery-redesign .delivery-item-card,
.staff-delivery-redesign .receiving-card,
.staff-cash-redesign .cash-header-card,
.staff-cash-redesign .cash-context.cash-summary-card,
.staff-cash-redesign .cash-context.cash-summary-card > div,
.staff-cash-redesign .cash-live-totals.cash-summary-card,
.staff-cash-redesign .cash-live-totals > div,
.staff-cash-redesign .photo-block,
.staff-cash-redesign .warning-block,
.staff-cash-redesign .cash-input-card,
.staff-cash-redesign .cash-confirmation.confirm-block,
.staff-cash-redesign .cash-photo-list > div {
  background: linear-gradient(180deg, var(--staff-surface-2), var(--staff-surface));
  border-color: var(--staff-border);
  color: var(--staff-text);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .26);
}

.staff-work-body .staff-task-card *,
.staff-work-body .summary-card *,
.staff-work-body .panel *,
.staff-work-body .task-card *,
.staff-work-body .leftovers-product *,
.staff-work-body .leftover-product-card *,
.staff-work-body .refrigerator-card *,
.staff-home-redesign .staff-next-task *,
.staff-home-redesign .staff-home-task-card *,
.staff-home-redesign .staff-home-summary-card *,
.staff-order-redesign .product-category-card *,
.staff-order-redesign .product-card *,
.staff-order-redesign .order-comment-panel *,
.staff-order-redesign .order-live-summary > div *,
.staff-delivery-redesign .delivery-item-card *,
.staff-delivery-redesign .receiving-live-card *,
.staff-delivery-redesign .receiving-stat *,
.staff-cash-redesign .cash-input-card *,
.staff-cash-redesign .cash-live-totals * {
  opacity: 1;
}

.staff-work-body .staff-task-card h2,
.staff-work-body .summary-card strong,
.staff-work-body .leftovers-product h2,
.staff-work-body .leftover-product-main > strong,
.staff-work-body .leftovers-progress strong,
.staff-work-body .leftovers-submit-bar strong,
.staff-work-body .refrigerator-card h2,
.staff-work-body .temperature-result strong,
.staff-work-body .quick-match-row strong,
.staff-work-body .quick-leftover-added em,
.staff-home-redesign .staff-home-day strong,
.staff-home-redesign .staff-home-summary-card strong,
.staff-home-redesign .staff-next-task h2,
.staff-home-redesign .task-copy h2,
.staff-order-redesign .product-card h2,
.staff-order-redesign .category-product-card h2,
.staff-order-redesign .order-product-name strong,
.staff-order-redesign .order-live-summary strong,
.staff-order-redesign .order-summary strong,
.staff-order-redesign .order-group-head strong,
.staff-order-redesign .row-total,
.staff-order-redesign .product-total,
.staff-order-redesign .category-quantity,
.staff-order-redesign .order-confirm-product strong,
.staff-order-redesign .order-success-card strong,
.staff-delivery-redesign .receiving-live-card strong,
.staff-delivery-redesign .receiving-card-head strong,
.staff-delivery-redesign .receiving-stat strong,
.staff-delivery-redesign .diff-cell,
.staff-cash-redesign .cash-context strong,
.staff-cash-redesign .cash-live-totals strong,
.staff-cash-redesign .cash-photo-list strong {
  color: var(--staff-text);
}

.staff-work-body .staff-task-card p,
.staff-work-body .summary-card span,
.staff-work-body .leftovers-product small,
.staff-work-body .leftovers-product label,
.staff-work-body .leftover-product-code,
.staff-work-body .leftover-product-facts span,
.staff-work-body .leftover-quantity-control > label,
.staff-work-body .leftovers-progress span,
.staff-work-body .leftovers-submit-bar span,
.staff-work-body .refrigerator-card p,
.staff-work-body .temperature-result span,
.staff-work-body .temperature-result small,
.staff-work-body .photo-picker small,
.staff-work-body .quick-match-row small,
.staff-work-body .quick-leftover-added span,
.staff-work-body .quick-leftover-added small,
.staff-home-redesign .staff-home-day span,
.staff-home-redesign .staff-home-summary-card span,
.staff-home-redesign .staff-home-summary-card p,
.staff-home-redesign .task-status,
.staff-order-redesign .order-live-summary span,
.staff-order-redesign .order-summary span,
.staff-order-redesign .order-product-name small,
.staff-order-redesign .order-recommendation-note,
.staff-order-redesign .category-search-hint,
.staff-order-redesign .order-history-main small,
.staff-order-redesign .order-history-main p,
.staff-order-redesign .order-recommendation-list li,
.staff-order-redesign .counter-block span,
.staff-order-redesign .order-confirm-product small,
.staff-order-redesign .order-success-card small,
.staff-order-redesign .order-success-comment,
.staff-order-redesign .order-confirm-comment,
.staff-delivery-redesign .delivery-context small,
.staff-delivery-redesign .receiving-order-grid span,
.staff-delivery-redesign .receiving-stat span,
.staff-delivery-redesign .receiving-fact-field span,
.staff-delivery-redesign .receiving-comment-field span,
.staff-delivery-redesign .receiving-live-card span,
.staff-delivery-redesign .order-success-details span,
.staff-cash-redesign .cash-context span,
.staff-cash-redesign .cash-live-totals span,
.staff-cash-redesign .cash-photo-section p,
.staff-cash-redesign .cash-photo-list small,
.staff-cash-redesign .cash-confirmation p {
  color: var(--staff-text-muted);
}

.staff-work-body .leftover-product-facts span,
.staff-work-body .counter-row.staff,
.staff-work-body .task-subtask.locked,
.staff-work-body .calendar-rule-new,
.staff-work-body .leftovers-date,
.staff-order-redesign .order-product-code,
.staff-order-redesign .order-recommendation-badge,
.staff-order-redesign .order-state-pill,
.staff-order-redesign .order-save-state,
.staff-order-redesign .order-admin-status,
.staff-delivery-redesign .receiving-code,
.staff-delivery-redesign .receiving-status,
.staff-cash-redesign .cash-save-state,
.staff-cash-redesign .money-input span {
  background: rgba(255, 247, 236, .08);
  border-color: var(--staff-border);
  color: var(--staff-text);
}

.staff-work-body .status-pill.success,
.staff-work-body .badge-success,
.staff-work-body .temperature-state.normal,
.staff-work-body .leftovers-sold,
.staff-order-redesign .order-recommendation-badge,
.staff-delivery-redesign .receiving-status.status-ok,
.staff-delivery-redesign .receiving-quick-button,
.staff-cash-redesign .cash-live-totals > div.main {
  color: var(--staff-success);
}

.staff-work-body .status-pill.warning,
.staff-work-body .badge-warning,
.staff-work-body .cash-status.draft,
.staff-home-redesign .task-status,
.staff-home-redesign .task-status.locked,
.staff-home-redesign .task-card.locked .task-status,
.staff-home-redesign .locked-task .task-status,
.staff-delivery-redesign .receiving-status.status-over,
.staff-order-redesign .order-save-state.saving {
  color: var(--staff-warning);
}

.staff-work-body .status-pill.danger,
.staff-work-body .status-pill.critical,
.staff-work-body .badge-danger,
.staff-work-body .temperature-state.alert,
.staff-home-redesign .task-status.overdue,
.staff-delivery-redesign .receiving-status.status-issue,
.staff-delivery-redesign .receiving-quick-button.danger,
.staff-order-redesign .order-save-state.error,
.staff-cash-redesign .cash-inline-error.warning-block {
  color: var(--staff-danger);
}

.staff-home-redesign .task-status.completed {
  color: var(--staff-success);
}

.staff-work-body .locked-task,
.staff-work-body .task-card.locked,
.staff-work-body .disabled,
.staff-work-body .disabled-task,
.staff-work-body .staff-start-button.disabled-task {
  background: linear-gradient(180deg, rgba(63, 54, 48, .94), rgba(43, 36, 31, .94));
  border-color: rgba(248, 226, 204, .1);
  color: var(--staff-text-soft);
  opacity: 1;
}

.staff-work-body input,
.staff-work-body select,
.staff-work-body textarea,
.staff-work-body .leftovers-product input,
.staff-work-body .leftover-quantity-control input,
.staff-work-body .temperature-form input,
.staff-work-body .temperature-form textarea,
.staff-work-body .quick-leftover-entry input,
.staff-work-body .quick-leftover-search input,
.staff-work-body .quick-match-row input,
.staff-order-redesign textarea,
.staff-order-redesign .order-comment-panel textarea,
.staff-delivery-redesign .receiving-input,
.staff-delivery-redesign .receiving-comment,
.staff-delivery-redesign .receiving-reason,
.staff-cash-redesign .money-input input,
.staff-cash-redesign .cash-text-grid textarea,
.staff-cash-redesign .cash-photo-upload input {
  background: #181310;
  border-color: var(--staff-border-strong);
  color: var(--staff-text);
  opacity: 1;
}

.staff-work-body input::placeholder,
.staff-work-body textarea::placeholder,
.staff-order-redesign input::placeholder,
.staff-order-redesign textarea::placeholder,
.staff-delivery-redesign input::placeholder,
.staff-delivery-redesign textarea::placeholder,
.staff-cash-redesign input::placeholder,
.staff-cash-redesign textarea::placeholder {
  color: var(--staff-text-soft);
  opacity: 1;
}

.staff-order-redesign .quantity-control input,
.staff-order-redesign .category-product-card input {
  background: #fff7ec;
  border-color: rgba(255, 247, 236, .4);
  color: #1d1713;
}

.staff-home-redesign .staff-home-bottom-action,
.staff-order-redesign .bottom-action-bar,
.staff-order-redesign .order-list-footer,
.staff-order-redesign .category-action-bar,
.staff-delivery-redesign .receiving-actions.bottom-action-bar,
.staff-cash-redesign .cash-complete-zone.bottom-action-bar {
  background: rgba(24, 19, 16, .96);
  border-color: var(--staff-border-strong);
  color: var(--staff-text);
}

.staff-work-body .staff-start-button.secondary-task,
.staff-work-body .staff-start-button.disabled-task,
.staff-delivery-redesign .delivery-action.problem,
.staff-cash-redesign .cash-photo-upload button {
  background: var(--staff-surface-3);
  border-color: var(--staff-border-strong);
  color: var(--staff-text);
}

/* Staff home card polish: nested rows and chips must stay dark too. */
.staff-home-redesign .progress-track {
  background: rgba(255, 247, 236, .12);
  border: 1px solid rgba(255, 247, 236, .12);
}

.staff-home-redesign .progress-track span {
  background: linear-gradient(90deg, var(--staff-accent), var(--staff-accent-hover));
}

.staff-home-redesign .task-section-count,
.staff-home-redesign .task-meta span,
.staff-home-redesign .staff-next-task-meta span,
.staff-home-redesign .staff-home-stat-row span {
  background: rgba(255, 247, 236, .09);
  border: 1px solid rgba(255, 247, 236, .13);
  color: var(--staff-text-muted);
}

.staff-home-redesign .task-subtask,
.staff-home-redesign .task-subtask.completed,
.staff-home-redesign .task-subtask.overdue,
.staff-home-redesign .task-subtask.locked {
  background: rgba(24, 19, 16, .72);
  border: 1px solid rgba(255, 247, 236, .12);
  color: var(--staff-text);
  box-shadow: none;
}

.staff-home-redesign .task-subtask strong {
  color: var(--staff-text);
}

.staff-home-redesign .task-subtask small {
  color: var(--staff-text-muted);
}

.staff-home-redesign .task-subtask-marker {
  background: rgba(255, 247, 236, .1);
  border: 1px solid rgba(255, 247, 236, .14);
  color: var(--staff-text-muted);
}

.staff-home-redesign .task-subtask.completed .task-subtask-marker {
  background: rgba(122, 212, 154, .16);
  border-color: rgba(122, 212, 154, .26);
  color: var(--staff-success);
}

.staff-home-redesign .task-subtask.overdue .task-subtask-marker {
  background: rgba(255, 154, 141, .16);
  border-color: rgba(255, 154, 141, .28);
  color: var(--staff-danger);
}

.staff-home-redesign .task-subtask.locked .task-subtask-marker {
  background: rgba(255, 247, 236, .07);
  color: var(--staff-text-soft);
}

.staff-home-redesign .task-copy {
  min-width: 0;
}

.staff-home-redesign .task-copy h2,
.staff-home-redesign .task-copy p,
.staff-home-redesign .task-subtask strong,
.staff-home-redesign .task-subtask small {
  overflow-wrap: anywhere;
}

/* Staff task pictograms: use meaningful icons instead of generic bread/question marks. */
.staff-home-redesign .task-icon {
  background: rgba(255, 247, 236, .08);
  border: 1px solid rgba(255, 247, 236, .14);
  color: var(--staff-text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}

.staff-home-redesign .order-task-icon,
.staff-home-redesign .leftovers-task-icon {
  background: rgba(223, 107, 51, .16);
  border-color: rgba(223, 107, 51, .3);
}

.staff-home-redesign .delivery-task-icon {
  background: rgba(122, 212, 154, .14);
  border-color: rgba(122, 212, 154, .26);
}

.staff-home-redesign .cash-task-icon {
  background: rgba(245, 195, 111, .15);
  border-color: rgba(245, 195, 111, .28);
  color: var(--staff-warning);
  font-weight: 950;
}

.staff-home-redesign .inventory-task-icon {
  background: rgba(105, 190, 210, .14);
  border-color: rgba(105, 190, 210, .28);
}

.staff-home-redesign .refrigerator-icon {
  background: rgba(120, 170, 255, .14);
  border-color: rgba(120, 170, 255, .26);
}

.staff-home-redesign .shift-close-task-icon {
  background: rgba(255, 247, 236, .1);
  border-color: rgba(255, 247, 236, .16);
}

.staff-home-redesign .task-subtask-marker {
  font-size: 16px;
  line-height: 1;
}

/* Staff home visual polish: align icons and make meta chips feel designed. */
.staff-home-redesign .staff-home-task-card {
  grid-template-columns: 90px minmax(0, 1fr);
  column-gap: 26px;
}

.staff-home-redesign .staff-home-task-card > .task-icon {
  width: 72px;
  height: 72px;
  align-self: start;
  justify-self: center;
  margin-top: 4px;
  border-radius: 22px;
  font-size: 32px;
}

.staff-home-redesign .staff-next-task .badge-info {
  width: max-content;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 14px;
  border: 1px solid rgba(223, 107, 51, .24);
  border-radius: 999px;
  background: rgba(223, 107, 51, .13);
  color: #f0b487;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .02em;
}

.staff-home-redesign .staff-next-task-meta,
.staff-home-redesign .task-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.staff-home-redesign .staff-next-task-meta > span,
.staff-home-redesign .task-meta > span,
.staff-home-redesign .task-status {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid rgba(255, 247, 236, .14);
  border-radius: 999px;
  background: rgba(255, 247, 236, .08);
  color: var(--staff-text-muted);
  font-size: 14px;
  font-weight: 850;
  line-height: 1;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.staff-home-redesign .staff-next-task-meta .task-status,
.staff-home-redesign .task-card-topline .task-status {
  color: var(--staff-warning);
}

.staff-home-redesign .staff-next-task-meta .task-status.completed,
.staff-home-redesign .task-card-topline .task-status.completed {
  color: var(--staff-success);
}

.staff-home-redesign .staff-next-task-meta .task-status.overdue,
.staff-home-redesign .task-card-topline .task-status.overdue {
  color: var(--staff-danger);
}

.staff-home-redesign .staff-next-task-meta .task-status.locked,
.staff-home-redesign .task-card-topline .task-status.locked {
  color: var(--staff-text-soft);
}

.staff-home-redesign .task-status i {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}

.staff-home-redesign .task-card-body {
  min-width: 0;
}

.staff-home-redesign .task-subtasks {
  margin-top: 18px;
}

/* Owner dashboard cleanup: remove light blocks from dark director view. */
.owner-dashboard-head,
.owner-finance-panel,
.owner-weekly-finance-panel,
.owner-bakery-money-panel,
.owner-loss-control,
.owner-close-panel,
.owner-summary-panel,
.owner-alerts-panel,
.owner-shops-panel,
.owner-ai-panel,
.owner-events-panel {
  color: var(--color-text);
}

.owner-shops-panel .shop-status-grid span,
.owner-ai-panel .ai-summary-item {
  background: rgba(255, 247, 236, .07);
  border: 1px solid rgba(255, 247, 236, .12);
  color: var(--color-text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.owner-shops-panel .shop-status-grid strong {
  color: rgba(255, 247, 236, .62);
  letter-spacing: .08em;
}

.owner-shops-panel .shop-status-grid small,
.owner-ai-panel .ai-summary-item {
  color: rgba(255, 247, 236, .86);
  font-weight: 850;
}

.owner-shops-panel .shop-overall-badge {
  background: rgba(255, 247, 236, .08);
  border: 1px solid rgba(255, 247, 236, .14);
  color: rgba(255, 247, 236, .9);
}

.owner-alerts-panel .attention-card,
.owner-shops-panel .shop-card {
  background: linear-gradient(180deg, rgba(34, 27, 23, .98), rgba(25, 20, 17, .98));
  border-color: rgba(223, 107, 51, .24);
}

.owner-alerts-panel .attention-card small,
.owner-events-panel .timeline-item small {
  color: rgba(255, 247, 236, .68);
}

.owner-alerts-panel .priority-badge {
  border: 1px solid rgba(255, 247, 236, .1);
  background: rgba(255, 247, 236, .08);
}

.owner-ai-panel .ai-summary-list {
  gap: 12px;
}

.owner-ai-panel .ai-summary-item {
  min-height: 56px;
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border-radius: 16px;
}

/* Bakery dashboard redesign - Phase 3.3 */
.bakery-dashboard {
  color: var(--color-text);
  display: grid;
  gap: 22px;
}
.bakery-dashboard a { color: inherit; }
.bakery-hero,
.bakery-section,
.bakery-kpi-card {
  background: linear-gradient(145deg, rgba(48, 38, 31, .96), rgba(28, 23, 19, .98));
  border: 1px solid rgba(225, 126, 72, .22);
  border-radius: 22px;
  box-shadow: var(--shadow-card);
}
.bakery-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  padding: 28px;
  align-items: stretch;
}
.bakery-hero h1,
.bakery-section h2,
.bakery-order-card h3,
.delivery-card h3,
.issue-card h3,
.bakery-finance-box h3 {
  color: var(--color-text);
  margin: 0;
}
.bakery-hero h1 { font-size: clamp(38px, 5vw, 72px); line-height: .95; max-width: 720px; }
.bakery-hero p,
.bakery-section p,
.bakery-order-card p,
.delivery-card p,
.issue-card p,
.bakery-finance-box p { color: var(--color-text-muted); }
.bakery-hero-main { display: grid; gap: 18px; align-content: start; }
.bakery-hero-side {
  display: grid;
  gap: 12px;
  align-content: center;
  padding: 22px;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  background: rgba(20, 17, 14, .72);
}
.bakery-hero-side strong { font-size: 34px; color: var(--color-text); }
.bakery-hero-side small { color: var(--color-text-muted); }
.bakery-date-form,
.bakery-finance-form {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
}
.bakery-date-form label,
.bakery-finance-form label {
  color: var(--color-text-muted);
  display: grid;
  gap: 6px;
  font-weight: 800;
}
.bakery-date-form input,
.bakery-finance-form input {
  background: rgba(20, 17, 14, .9);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  min-height: 50px;
}
.bakery-date-strip { display: flex; gap: 8px; flex-wrap: wrap; }
.bakery-date-strip a {
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 900;
}
.bakery-date-strip a.active,
.bakery-date-strip a:hover { border-color: var(--color-accent); color: var(--color-accent-hover); background: rgba(213, 106, 54, .14); }
.bakery-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.bakery-kpi-card { padding: 18px; display: grid; gap: 8px; }
.bakery-kpi-card span,
.export-panel-grid article > span { color: var(--color-text-muted); font-weight: 900; text-transform: uppercase; letter-spacing: .08em; font-size: 12px; }
.bakery-kpi-card strong { color: var(--color-text); font-size: 36px; line-height: 1; }
.bakery-kpi-card small { color: var(--color-text-muted); }
.bakery-kpi-card.accent { border-color: rgba(213, 106, 54, .55); }
.bakery-kpi-card.success { border-color: rgba(80, 180, 117, .42); }
.bakery-kpi-card.danger { border-color: rgba(218, 85, 72, .6); }
.bakery-section { padding: 24px; }
.bakery-section-head { display: flex; justify-content: space-between; gap: 16px; align-items: start; margin-bottom: 18px; }
.bakery-section-head p { margin: 6px 0 0; }
.bakery-section-actions,
.bakery-card-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.bakery-product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.product-count-card,
.bakery-order-card,
.delivery-card,
.issue-card,
.export-panel-grid article,
.bakery-finance-box,
.finance-report-list a {
  background: rgba(22, 18, 15, .82);
  border: 1px solid var(--color-border);
  border-radius: 18px;
  color: var(--color-text);
}
.product-count-card { padding: 16px; display: grid; gap: 12px; grid-template-columns: 1fr auto; align-items: start; }
.product-count-main { display: grid; gap: 5px; min-width: 0; }
.product-count-main strong { color: var(--color-text); font-size: 18px; }
.product-count-main small,
.product-breakdown summary,
.product-breakdown span { color: var(--color-text-muted); }
.product-code {
  width: fit-content;
  border: 1px solid rgba(213, 106, 54, .35);
  color: var(--color-accent-hover);
  border-radius: 999px;
  padding: 3px 8px;
  font-weight: 900;
  font-size: 12px;
}
.product-count-total { text-align: right; min-width: 76px; }
.product-count-total strong { color: var(--color-text); font-size: 38px; line-height: .95; display: block; }
.product-count-total span { color: var(--color-text-muted); font-weight: 800; }
.product-breakdown { grid-column: 1 / -1; }
.product-breakdown summary { cursor: pointer; font-weight: 900; }
.product-breakdown div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.product-breakdown span { border: 1px solid var(--color-border); border-radius: 999px; padding: 4px 8px; }
.bakery-order-grid,
.delivery-card-grid,
.issue-card-grid,
.export-panel-grid,
.finance-report-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.bakery-order-card,
.delivery-card,
.issue-card { padding: 18px; display: grid; gap: 12px; }
.bakery-card-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; color: var(--color-text-muted); font-weight: 900; }
.bakery-status-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .04em;
  text-transform: uppercase;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  background: rgba(255, 255, 255, .04);
}
.bakery-status-badge.success { border-color: rgba(80, 180, 117, .4); color: #91d6a8; background: rgba(80, 180, 117, .11); }
.bakery-status-badge.warning { border-color: rgba(226, 170, 58, .45); color: #f0c46b; background: rgba(226, 170, 58, .12); }
.bakery-status-badge.danger { border-color: rgba(218, 85, 72, .55); color: #ee9b91; background: rgba(218, 85, 72, .12); }
.bakery-order-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.bakery-order-meta span,
.delivery-muted {
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 6px 9px;
  color: var(--color-text-muted);
  font-weight: 850;
}
.bakery-comment { border-left: 3px solid var(--color-accent); padding-left: 10px; }
.delivery-card { grid-template-columns: 1fr auto; align-items: center; }
.delivery-card.ready { border-color: rgba(80, 180, 117, .3); }
.delivery-card.missing { border-color: rgba(226, 170, 58, .3); }
.issue-card { border-color: rgba(218, 85, 72, .5); }
.issue-card small { color: var(--color-text-muted); line-height: 1.45; }
.bakery-empty-state,
.bakery-more-note {
  border: 1px solid var(--color-border);
  border-radius: 18px;
  background: rgba(22, 18, 15, .72);
  color: var(--color-text-muted);
  padding: 18px;
  font-weight: 850;
}
.bakery-empty-state.success { border-color: rgba(80, 180, 117, .35); color: #9de1b2; }
.export-panel-grid article { padding: 18px; display: grid; gap: 10px; }
.export-panel-grid article strong { color: var(--color-text); font-size: 20px; }
.export-panel-grid article a,
.finance-report-list a {
  color: var(--color-text);
  text-decoration: none;
}
.export-panel-grid article a {
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 900;
  background: rgba(255, 255, 255, .04);
}
.export-panel-grid article a:hover,
.finance-report-list a:hover { border-color: var(--color-accent); color: var(--color-accent-hover); }
.bakery-finance-box { margin-top: 16px; padding: 18px; display: grid; gap: 14px; }
.finance-report-list { margin-top: 14px; }
.finance-report-list a { padding: 14px; display: grid; gap: 5px; }
.finance-report-list span { color: var(--color-text-muted); }
@media (max-width: 1180px) {
  .bakery-hero { grid-template-columns: 1fr; }
  .bakery-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bakery-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .bakery-hero, .bakery-section { padding: 18px; }
  .bakery-product-grid,
  .bakery-order-grid,
  .delivery-card-grid,
  .issue-card-grid,
  .export-panel-grid,
  .finance-report-list,
  .bakery-kpi-grid { grid-template-columns: 1fr; }
  .bakery-section-head,
  .delivery-card { display: grid; }
  .bakery-hero h1 { font-size: 42px; }
}

/* Daily opening confirmation and carryover workflow. */
.opening-confirmation-shell {
  max-width: 980px;
  padding-bottom: 120px;
}
.opening-confirmation-screen {
  display: grid;
  gap: 20px;
  padding-top: 30px;
}
.opening-confirmation-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
}
.opening-confirmation-head h1 {
  margin: 8px 0 10px;
  font-size: 44px;
  letter-spacing: 0;
}
.opening-confirmation-head p,
.opening-confirmed-state p,
.opening-empty-state p {
  margin: 0;
  color: var(--color-text-muted);
}
.opening-mode {
  max-width: 280px;
  padding: 10px 12px;
  border: 1px solid var(--color-border-strong);
  border-radius: 8px;
  color: var(--color-text-muted);
  font-weight: 800;
}
.opening-confirmation-form,
.opening-confirmed-state,
.opening-empty-state,
.delivery-opening-blocker {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-card);
}
.opening-product-list {
  display: grid;
}
.opening-product-row {
  display: grid;
  grid-template-columns: 52px minmax(220px, 1fr) 90px 110px;
  gap: 14px;
  align-items: center;
  min-height: 82px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border);
}
.opening-product-row:last-child { border-bottom: 0; }
.opening-product-code {
  color: var(--color-accent-hover);
  font-weight: 900;
}
.opening-product-name,
.opening-source-qty {
  display: grid;
  gap: 3px;
}
.opening-product-name small,
.opening-source-qty small { color: var(--color-text-muted); }
.opening-source-qty b { font-size: 22px; }
.opening-product-row input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--color-border-strong);
  border-radius: 8px;
  background: #171411;
  color: var(--color-text);
  text-align: center;
  font-size: 22px;
  font-weight: 900;
}
.opening-comment-field {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-weight: 800;
}
.opening-comment-field textarea {
  resize: vertical;
  min-height: 86px;
}
.opening-submit-bar {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 18px;
  border-top: 1px solid var(--color-border);
}
.opening-submit-bar div { display: grid; gap: 3px; }
.opening-submit-bar span { color: var(--color-text-muted); }
.opening-confirmed-state,
.opening-empty-state {
  display: grid;
  gap: 18px;
  padding: 24px;
}
.opening-confirmed-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-border);
}
.opening-confirmed-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  background: #1a1714;
}
.opening-comment { padding-left: 12px; border-left: 3px solid var(--color-warning); }
.delivery-opening-blocker {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 22px;
  border-color: rgba(230, 184, 79, .5);
}
.delivery-opening-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-warning-soft);
  font-size: 26px;
}
.delivery-opening-blocker h2 { margin: 5px 0; }
.delivery-opening-blocker p { margin: 0; color: var(--color-text-muted); }
.leftovers-carryover-note {
  display: grid;
  gap: 4px;
  margin: 0 0 18px;
  padding: 14px 16px;
  border-left: 3px solid var(--color-info);
  background: var(--color-info-soft);
}
.leftovers-carryover-note span { color: var(--color-text-muted); }

@media (max-width: 720px) {
  .opening-confirmation-head { grid-template-columns: 1fr; }
  .opening-confirmation-head h1 { font-size: 36px; }
  .opening-mode { max-width: none; }
  .opening-product-row {
    grid-template-columns: 42px minmax(0, 1fr) 86px;
  }
  .opening-source-qty { display: none; }
  .opening-confirmed-list { grid-template-columns: 1fr; }
  .opening-submit-bar,
  .delivery-opening-blocker {
    display: grid;
    grid-template-columns: 1fr;
  }
  .opening-submit-bar .primary,
  .delivery-opening-blocker .primary { width: 100%; }
}

body.staff-home-redesign .staff-home-quick-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1180px) {
  body.staff-home-redesign .staff-home-quick-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  body.staff-home-redesign .staff-home-quick-summary {
    grid-template-columns: 1fr;
  }
}
/* Employee shift terminal */
.staff-shift-entry-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  margin: 22px 0;
  padding: 26px;
  border: 1px solid rgba(226, 126, 67, .45);
  background: #25211d;
  color: #f6f1eb;
  border-radius: 8px;
}
.staff-shift-entry-card h2 { margin: 7px 0; font-size: 28px; }
.staff-shift-entry-card p { margin: 0; color: #bdb4aa; }
.shift-clock-shell { max-width: 920px; }
.shift-clock-card {
  width: min(100%, 680px);
  margin: 38px auto 24px;
  padding: 36px;
  background: #25211d;
  border: 1px solid #443b33;
  border-radius: 8px;
  color: #f7f1ea;
  text-align: center;
}
.shift-pin-intro h1, .shift-confirmation h1, .shift-result h1 {
  margin: 8px 0;
  font-size: clamp(30px, 5vw, 48px);
}
.shift-pin-intro p, .shift-confirmation p, .shift-result p {
  color: #bdb4aa;
  font-size: 18px;
}
.shift-pin-form { max-width: 460px; margin: 26px auto 0; }
.shift-pin-form > input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.shift-pin-dots {
  display: flex;
  justify-content: center;
  gap: 16px;
  min-height: 26px;
  margin-bottom: 24px;
}
.shift-pin-dots i {
  width: 18px;
  height: 18px;
  border: 2px solid #817469;
  border-radius: 50%;
}
.shift-pin-dots i.filled { background: #e27e43; border-color: #e27e43; }
.shift-keypad {
  display: grid;
  grid-template-columns: repeat(3, minmax(72px, 1fr));
  gap: 12px;
}
.shift-keypad button {
  min-height: 72px;
  border: 1px solid #5b5047;
  border-radius: 8px;
  background: #181613;
  color: #fff;
  font-size: 28px;
  font-weight: 800;
}
.shift-keypad button:active { background: #e27e43; color: #161310; }
.shift-pin-submit, .shift-clock-action {
  width: 100%;
  margin-top: 20px;
  border: 0;
  cursor: pointer;
}
.shift-pin-submit:disabled { opacity: .42; cursor: not-allowed; }
.staff-secondary-action {
  display: inline-block;
  margin-top: 18px;
  color: #c7b9ad;
}
.shift-result-icon {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: #2e8057;
  color: #fff;
  font-size: 40px;
}
.shift-result.error .shift-result-icon { background: #a94536; }
.shift-result > strong { display: block; margin: 18px 0; font-size: 36px; }
.shift-result > small { display: block; margin: -8px 0 20px; color: #bdb4aa; }
.shift-point-active {
  width: min(100%, 680px);
  margin: 0 auto 120px;
  padding: 24px;
  background: #1d1a17;
  border: 1px solid #3d3630;
  border-radius: 8px;
  color: #f7f1ea;
}
.shift-point-active h2 { margin-top: 0; }
.shift-point-active > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid #39322c;
}
@media (max-width: 760px) {
  .staff-shift-entry-card { grid-template-columns: 1fr; }
  .staff-shift-entry-card .staff-primary-action { width: 100%; text-align: center; }
  .shift-clock-card { margin-top: 18px; padding: 24px 16px; }
  .shift-keypad button { min-height: 66px; }
}
