:root {
  color-scheme: light;
  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-soft: #f1f4f2;
  --ink: #17201d;
  --muted: #69736f;
  --line: #e1e6e3;
  --green: #16733c;
  --green-soft: #eaf6ed;
  --blue: #1769aa;
  --blue-soft: #e8f2fb;
  --violet: #6d3bb7;
  --violet-soft: #f0eafb;
  --amber: #a85d08;
  --amber-soft: #fff3dc;
  --red: #b42318;
  --red-soft: #fff0ee;
  --shadow: 0 6px 22px rgba(30, 45, 39, 0.07);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-width: 320px;
  max-width: 100%;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--bg);
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(23, 105, 170, 0.28);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

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

.auth-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 18px;
  background: #eef3f1;
}

.auth-panel {
  width: min(100%, 420px);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.brand-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  border-radius: 8px;
  color: #fff;
  background: var(--green);
  font-size: 18px;
  font-weight: 800;
}

.auth-panel h1,
.app-header h1,
.page-heading h2,
.section-heading h2,
.dialog-header h2 {
  margin: 0;
  letter-spacing: 0;
}

.auth-panel h1 {
  font-size: 28px;
  line-height: 1.2;
}

.eyebrow,
.section-kicker {
  margin: 0 0 4px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.muted {
  margin: 5px 0 0;
  color: var(--muted);
}

.auth-panel > .button {
  margin-top: 24px;
}

.button {
  min-height: 50px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 750;
}

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

.button-primary:hover {
  background: #12562c;
}

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

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

.button-full {
  width: 100%;
}

.button-link {
  width: 100%;
  min-height: 46px;
  margin-top: 10px;
  border: 0;
  background: transparent;
  color: var(--green);
  cursor: pointer;
  font-weight: 750;
}

.google-mark {
  display: inline-grid;
  width: 24px;
  height: 24px;
  margin-right: 8px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: #2766c2;
  background: #fff;
}

.apple-login-button {
  width: 100%;
  height: 50px;
  margin-top: 10px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 7px;
  background: #000;
  cursor: pointer;
}

.apple-login-button img {
  width: 100%;
  height: 50px;
  display: block;
  object-fit: fill;
}

.apple-login-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.auth-provider-status {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}

.separator {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
  color: var(--muted);
  font-size: 13px;
}

.separator::before,
.separator::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

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

.field {
  display: grid;
  gap: 7px;
  color: #3e4945;
  font-size: 14px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea,
.temperature-input,
.compact-select {
  width: 100%;
  min-height: 54px;
  border: 1px solid #d3dad6;
  border-radius: 7px;
  color: var(--ink);
  background: #fbfcfd;
  font-size: 16px;
}

.field input,
.field select,
.field textarea {
  padding: 11px 13px;
}

.field textarea {
  min-height: 88px;
  resize: vertical;
}

.form-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--red);
  background: var(--red-soft);
  font-size: 14px;
}

.language-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(42px, auto));
  min-height: 38px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.language-option {
  min-width: 42px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.language-option.is-active {
  color: #fff;
  background: var(--green);
}

.auth-language {
  display: grid;
  width: 132px;
  margin: 18px auto 0;
}

.merchant-view {
  min-height: 100vh;
  padding: calc(20px + env(safe-area-inset-top)) 16px calc(28px + env(safe-area-inset-bottom));
  background: #f7f9f8;
}

.merchant-shell {
  width: min(100%, 760px);
  margin: 0 auto;
}

.merchant-header,
.merchant-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand-lockup {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 13px;
}

.brand-lockup .brand-mark {
  flex: 0 0 auto;
  margin: 0;
}

.brand-lockup h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.merchant-intro {
  margin: 28px 0 0;
  font-size: 17px;
  font-weight: 750;
}

.merchant-user {
  margin-top: 4px;
  font-size: 13px;
}

.merchant-list {
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.merchant-row {
  width: 100%;
  min-height: 76px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 0;
  background: var(--surface);
  cursor: pointer;
  text-align: left;
}

.merchant-row + .merchant-row {
  border-top: 1px solid var(--line);
}

.merchant-row:hover,
.merchant-row.is-current {
  background: var(--green-soft);
}

.merchant-row-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.merchant-row-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.merchant-row-copy small {
  color: var(--muted);
}

.merchant-source {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #fff;
  background: var(--green);
  font-size: 13px;
  font-weight: 850;
}

.merchant-source-standalone {
  color: #4c3b00;
  background: var(--amber-soft);
}

.merchant-chevron {
  color: var(--muted);
  font-size: 24px;
}

.merchant-empty {
  padding: 20px 16px;
  color: var(--muted);
  text-align: center;
}

.merchant-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.merchant-action {
  width: 100%;
  min-height: 78px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  text-align: left;
}

.merchant-action:hover {
  border-color: #8ab899;
}

.merchant-action > span:last-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.merchant-action small {
  color: var(--muted);
  line-height: 1.35;
}

.merchant-action-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 20px;
  font-weight: 850;
}

.merchant-action-c2 {
  color: #fff;
  background: var(--green);
  font-size: 13px;
}

.merchant-footer {
  margin-top: 18px;
}

.merchant-footer .button {
  min-width: 112px;
}

.merchant-logout {
  width: auto;
  margin: 0 0 0 auto;
  color: var(--red);
}

.employee-view {
  min-height: 100vh;
  padding-bottom: calc(78px + env(safe-area-inset-bottom));
}

.app-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-height: 82px;
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
}

.app-header h1 {
  max-width: 48vw;
  overflow: hidden;
  font-size: 19px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.status-chip {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.status-offline .status-dot {
  background: var(--amber);
}

.offline-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  color: #563000;
  background: var(--amber-soft);
  font-size: 13px;
}

.app-main {
  width: min(100%, 920px);
  margin: 0 auto;
  padding: 18px 14px 34px;
}

.app-view {
  min-height: calc(100vh - 190px);
}

.today-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.progress-value {
  margin: 4px 0 0;
  font-size: 40px;
  font-weight: 850;
  line-height: 1;
}

.progress-divider {
  padding: 0 5px;
  color: #95a39d;
  font-weight: 500;
}

.progress-ring {
  width: 72px;
  height: 72px;
  display: grid;
  flex: 0 0 72px;
  place-items: center;
  border: 8px solid #dbe7df;
  border-top-color: var(--green);
  border-radius: 50%;
  color: var(--green);
  background: var(--surface);
  font-size: 13px;
  font-weight: 850;
}

.content-section {
  margin-top: 22px;
}

.urgent-section {
  padding-top: 4px;
}

.section-heading,
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.page-heading:not(.history-heading) {
  display: block;
}

.section-heading h2,
.page-heading h2,
.dialog-header h2 {
  font-size: 20px;
  line-height: 1.25;
}

.count-badge {
  min-width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  color: #fff;
  background: var(--green);
  font-size: 13px;
  font-weight: 850;
}

.task-list,
.history-list {
  display: grid;
  gap: 10px;
}

.task-card {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 84px;
  padding: 13px 14px;
  border: 0;
  border-left: 4px solid var(--green);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.task-card.is-urgent {
  border-left-color: var(--amber);
}

.task-card.is-danger {
  border-left-color: var(--red);
}

.task-card.is-complete {
  border-left-color: var(--green);
  background: #fbfdfc;
}

.task-code,
.tile-code,
.history-code {
  display: grid;
  place-items: center;
  border-radius: 7px;
  font-weight: 850;
}

.task-code {
  width: 42px;
  height: 42px;
  color: var(--green);
  background: var(--green-soft);
}

.task-code-blue,
.tile-code-blue,
.history-code-blue {
  color: var(--blue);
  background: var(--blue-soft);
}

.task-code-violet,
.tile-code-violet,
.history-code-violet {
  color: var(--violet);
  background: var(--violet-soft);
}

.task-code-green,
.tile-code-green,
.history-code-green {
  color: var(--green);
  background: var(--green-soft);
}

.task-code-red,
.tile-code-red,
.history-code-red {
  color: var(--red);
  background: var(--red-soft);
}

.task-copy {
  min-width: 0;
}

.task-copy strong,
.task-copy span {
  display: block;
}

.task-copy strong {
  font-size: 16px;
  overflow-wrap: anywhere;
}

.task-copy span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.task-button {
  min-width: 76px;
  min-height: 46px;
  padding: 10px 12px;
  border: 0;
  border-radius: 7px;
  color: var(--green);
  background: var(--green-soft);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.task-button.is-amber {
  color: var(--amber);
  background: var(--amber-soft);
}

.task-button.is-red {
  color: var(--red);
  background: var(--red-soft);
}

.task-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 6px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 12px;
  font-weight: 800;
}

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

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

.module-tile {
  min-height: 138px;
  display: grid;
  align-content: space-between;
  justify-items: start;
  gap: 16px;
  padding: 16px;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  text-align: left;
  background: var(--surface);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.module-tile.is-danger {
  box-shadow: inset 0 0 0 2px #efb3ae, var(--shadow);
}

.module-tile-copy {
  min-width: 0;
}

.module-tile-copy strong,
.module-tile-copy small {
  display: block;
  overflow-wrap: anywhere;
}

.module-tile-copy strong {
  font-size: 16px;
}

.module-tile-copy small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.module-tile.is-danger .module-tile-copy small {
  color: var(--red);
  font-weight: 750;
}

.action-tile {
  min-height: 142px;
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 16px;
  border: 0;
  border-radius: 8px;
  text-align: left;
  background: var(--surface);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.action-tile strong {
  font-size: 16px;
}

.action-tile > span:last-child {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.tile-code {
  width: 42px;
  height: 42px;
}

.tile-code-amber {
  color: var(--amber);
  background: var(--amber-soft);
}

.empty-state {
  padding: 24px 18px;
  border: 1px dashed #c8d0cc;
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.55);
}

.compact-select {
  width: auto;
  min-height: 42px;
  padding: 8px 34px 8px 11px;
}

.history-entry {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.history-code {
  width: 40px;
  height: 40px;
}

.history-entry strong,
.history-entry small {
  display: block;
}

.history-entry small {
  margin-top: 4px;
  color: var(--muted);
}

.sync-badge {
  padding: 5px 8px;
  border-radius: 6px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 11px;
  font-weight: 800;
}

.profile-band {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 0 22px;
  border-bottom: 1px solid var(--line);
}

.avatar {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
  font-weight: 850;
}

.settings-list {
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.settings-row {
  width: 100%;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 15px;
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.settings-row:last-child {
  border-bottom: 0;
}

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

.settings-row small {
  margin-top: 4px;
  color: var(--muted);
}

.settings-row-danger strong {
  color: var(--red);
}

.bottom-nav {
  position: fixed;
  z-index: 30;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-height: calc(68px + env(safe-area-inset-bottom));
  padding: 5px 6px calc(5px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(16px);
}

.nav-item {
  min-width: 0;
  min-height: 56px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
  padding: 4px 2px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  font-weight: 750;
}

.nav-item > span:last-child {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-item.is-active {
  color: var(--green);
  background: transparent;
}

.nav-icon {
  position: relative;
  width: 22px;
  height: 22px;
  display: block;
}

.nav-icon-today::before,
.nav-icon-records::before,
.nav-icon-history::before,
.nav-icon-more::before {
  content: "";
  position: absolute;
  inset: 2px;
  border: 2px solid currentColor;
}

.nav-icon-today::before {
  border-radius: 5px;
  box-shadow: inset 0 5px 0 transparent;
}

.nav-icon-today::after {
  content: "";
  position: absolute;
  top: 7px;
  right: 4px;
  left: 4px;
  border-top: 2px solid currentColor;
}

.nav-icon-records::before {
  border-radius: 3px;
}

.nav-icon-records::after {
  content: "";
  position: absolute;
  top: 7px;
  right: 6px;
  width: 7px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 5px 0 currentColor;
}

.nav-icon-history::before {
  border-radius: 50%;
}

.nav-icon-history::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 10px;
  width: 2px;
  height: 7px;
  background: currentColor;
  transform-origin: bottom;
  transform: rotate(-35deg);
}

.nav-icon-more::before {
  inset: 9px 2px auto;
  height: 4px;
  border: 0;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 8px 0 0 currentColor, 16px 0 0 currentColor;
}

.action-dialog {
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.action-dialog::backdrop {
  background: rgba(17, 27, 23, 0.48);
}

.dialog-shell {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 100%;
  max-height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  max-width: 100%;
  border-radius: 0;
  background: var(--bg);
  box-shadow: 0 -12px 40px rgba(17, 27, 23, 0.18);
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.dialog-header > div {
  min-width: 0;
  flex: 1;
  text-align: center;
}

.dialog-header .section-kicker {
  margin-bottom: 2px;
}

.icon-button {
  width: 48px;
  height: 48px;
  display: grid;
  flex: 0 0 48px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--surface-soft);
  cursor: pointer;
  font-size: 30px;
  font-weight: 300;
  line-height: 1;
}

.dialog-body {
  min-width: 0;
  max-width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 14px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.dialog-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.dialog-footer.has-secondary {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
}

.form-section {
  margin: 0 0 22px;
  padding: 0;
  border: 0;
}

.workflow-form {
  width: min(100%, 560px);
  max-width: 100%;
  margin: 0 auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.workflow-form > :last-child {
  margin-bottom: 0;
}

.form-section legend,
.form-section-title {
  margin-bottom: 10px;
  font-weight: 850;
}

.temperature-grid {
  display: grid;
  gap: 10px;
}

.temperature-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.temperature-row.is-normal {
  border-color: #8bc99e;
  background: #f5fbf7;
}

.temperature-row.is-warning {
  border-color: #e0a243;
  background: #fffaf0;
}

.temperature-row.is-danger {
  border-color: #e39a93;
  background: #fff7f6;
}

.temperature-meta strong,
.temperature-meta span {
  display: block;
  text-align: center;
}

.temperature-meta strong {
  font-size: 20px;
}

.temperature-meta span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.temperature-control {
  position: relative;
}

.temperature-input {
  min-height: 72px;
  padding: 10px 46px 10px 18px;
  text-align: center;
  font-size: 30px;
  font-weight: 850;
}

.temperature-unit {
  position: absolute;
  top: 50%;
  right: 16px;
  color: var(--muted);
  transform: translateY(-50%);
}

.quick-values,
.category-tabs,
.choice-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.workflow-temperature .quick-values {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 10px;
}

.workflow-temperature .quick-value {
  min-width: 0;
  padding-right: 5px;
  padding-left: 5px;
}

.quick-value,
.category-tab,
.choice-button {
  min-height: 44px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  cursor: pointer;
  font-weight: 750;
}

.category-tab.is-active,
.quick-value.is-active,
.choice-button.is-active {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-soft);
}

.category-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 14px 0 9px;
}

.select-all-button {
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--green);
  border-radius: 7px;
  color: var(--green);
  background: var(--green-soft);
  cursor: pointer;
  font-weight: 800;
}

.product-checklist {
  display: grid;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 2px;
}

.product-check {
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.product-check:has(input:checked) {
  border-color: #76b78a;
  background: var(--green-soft);
}

.product-check input {
  width: 22px;
  height: 22px;
  accent-color: var(--green);
}

.product-check span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.form-grid {
  display: grid;
  gap: 13px;
  min-width: 0;
}

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

.form-grid > *,
.field {
  min-width: 0;
}

.inline-note {
  margin: 8px 0 0;
  padding: 10px 12px;
  border-radius: 7px;
  color: #4c3b00;
  background: var(--amber-soft);
  font-size: 13px;
  line-height: 1.4;
}

.photo-input {
  min-height: 112px;
  display: grid;
  place-items: center;
  gap: 5px;
  padding: 16px;
  border: 1px dashed #9eaaa5;
  border-radius: 8px;
  text-align: center;
  background: #fafcfb;
}

.photo-input::before {
  content: "";
  width: 34px;
  height: 26px;
  display: block;
  border: 2px solid var(--muted);
  border-radius: 5px;
  background:
    radial-gradient(circle at 50% 52%, transparent 0 5px, var(--muted) 6px 7px, transparent 8px),
    linear-gradient(var(--muted), var(--muted)) 6px -5px / 12px 7px no-repeat;
  opacity: 0.75;
}

.photo-input-hint {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}

.photo-source-actions {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.photo-source-button {
  min-width: 0;
  min-height: 48px;
  display: grid;
  place-items: center;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--green);
  background: var(--surface);
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
}

.photo-source-camera {
  color: #fff;
  border-color: var(--green);
  background: var(--green);
}

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

.receiving-issue-fields {
  margin-bottom: 0;
  padding: 14px;
  border: 1px solid #efc47c;
  border-radius: 8px;
  background: var(--amber-soft);
}

.receiving-items {
  display: grid;
  gap: 12px;
}

.receiving-item {
  min-width: 0;
  display: grid;
  gap: 13px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.receiving-item-header {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.receiving-item-remove {
  width: 36px;
  height: 36px;
  flex-basis: 36px;
  font-size: 23px;
}

.recognition-panel {
  min-height: 66px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #9fc8ad;
  border-radius: 8px;
  color: #174f2d;
  background: var(--green-soft);
}

.recognition-panel[hidden] {
  display: none;
}

.recognition-panel strong,
.recognition-panel small {
  display: block;
}

.recognition-panel small {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.35;
}

.recognition-indicator {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-weight: 900;
}

.recognition-panel[data-state="analyzing"] .recognition-indicator {
  border-right-color: transparent;
  animation: recognition-spin 0.8s linear infinite;
}

.recognition-panel[data-state="ready"] .recognition-indicator::after {
  content: "✓";
}

.recognition-panel[data-state="empty"],
.recognition-panel[data-state="unavailable"] {
  border-color: #dfbd77;
  color: #765000;
  background: var(--amber-soft);
}

.recognition-panel[data-state="empty"] .recognition-indicator::after,
.recognition-panel[data-state="unavailable"] .recognition-indicator::after {
  content: "!";
}

@keyframes recognition-spin {
  to {
    transform: rotate(360deg);
  }
}

.photo-preview-grid,
.history-photo-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  width: 100%;
  margin-top: 9px;
}

.photo-preview-item,
.history-photo {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #edf2ef;
}

.photo-preview-item img,
.history-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.task-photo,
.temperature-device-photo {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #edf2ef;
}

.task-photo {
  width: 42px;
  height: 42px;
}

.task-photo img,
.temperature-device-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.temperature-device-photo {
  width: 100%;
  max-height: 180px;
  margin-bottom: 12px;
  aspect-ratio: 16 / 9;
}

.temperature-picker {
  display: grid;
  gap: 9px;
}

.temperature-picker-row {
  width: 100%;
  min-height: 72px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  text-align: left;
  background: var(--surface);
  cursor: pointer;
}

.temperature-picker-photo,
.temperature-picker-code {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 6px;
  color: var(--blue);
  background: var(--blue-soft);
  font-weight: 850;
}

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

.temperature-picker-copy {
  min-width: 0;
}

.temperature-picker-copy strong,
.temperature-picker-copy small {
  display: block;
}

.temperature-picker-copy small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.35;
}

.temperature-picker-status {
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.photo-upload-progress {
  height: 4px;
  overflow: hidden;
  margin-top: 7px;
  border-radius: 2px;
  background: #dce5e0;
}

.photo-upload-progress span {
  display: block;
  height: 100%;
  background: var(--green);
  transition: width 160ms linear;
}

.history-entry.has-photos {
  align-items: start;
}

.history-entry-copy {
  min-width: 0;
}

.history-entry-actions {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.retry-button {
  min-height: 34px;
  padding: 5px 9px;
  border: 1px solid #b45309;
  border-radius: 6px;
  color: #92400e;
  background: #fff7ed;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

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

.cleaning-settings-list,
.cleaning-settings-list > div {
  display: grid;
  gap: 12px;
}

.cleaning-config-row {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.cleaning-config-heading,
.cleaning-config-toggles {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cleaning-config-heading {
  margin-bottom: 12px;
}

.cleaning-config-toggles {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 10px;
}

.cleaning-config-toggles label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
}

.weekday-picker {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
}

.weekday-picker label {
  position: relative;
}

.weekday-picker input {
  position: absolute;
  opacity: 0;
}

.weekday-picker span {
  display: grid;
  place-items: center;
  min-width: 28px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}

.weekday-picker input:checked + span {
  border-color: var(--green);
  color: #fff;
  background: var(--green);
}

.icon-button-danger {
  color: #991b1b;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 16px;
  bottom: calc(86px + env(safe-area-inset-bottom));
  left: 16px;
  max-width: 520px;
  margin: 0 auto;
  padding: 13px 15px;
  border-radius: 7px;
  color: #fff;
  background: #17201d;
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: 700;
}

.reminder-section {
  border-left: 4px solid #d97706;
}

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

.reminder-row {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: inherit;
  background: #fffaf0;
  overflow: hidden;
}

.reminder-row.is-escalated {
  border-color: #efb0b0;
  background: #fff7f7;
}

.reminder-open {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 62px;
  padding: 10px;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.reminder-copy {
  min-width: 0;
}

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

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

.reminder-symbol {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  color: #8a4b08;
  background: #ffedd5;
  font-weight: 900;
}

.reminder-time {
  color: #8a4b08;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.reminder-cancel {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-top: 1px solid #fed7aa;
  color: #9a3412;
  background: #fff;
  font-size: 13px;
  font-weight: 800;
}

.reminder-row.is-escalated .reminder-cancel {
  border-top-color: #fecaca;
  color: #b91c1c;
}

@media (min-width: 720px) {
  .merchant-view {
    padding-top: 42px;
  }

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

  .app-header {
    padding-right: 28px;
    padding-left: 28px;
  }

  .app-main {
    padding: 26px 24px 42px;
  }

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

  .bottom-nav {
    right: 50%;
    left: auto;
    width: min(620px, 100%);
    border-right: 1px solid var(--line);
    border-left: 1px solid var(--line);
    transform: translateX(50%);
  }

  .dialog-shell {
    top: 4vh;
    bottom: 4vh;
    left: 50%;
    width: min(680px, calc(100% - 32px));
    height: auto;
    max-height: 92vh;
    border-radius: 8px;
    transform: translateX(-50%);
  }

  .dialog-footer {
    padding-bottom: 14px;
  }

  .workflow-form {
    padding: 22px;
  }
}

@media (max-width: 420px) {
  .app-header {
    align-items: center;
  }

  .app-header .muted {
    font-size: 12px;
  }

  .header-actions {
    max-width: 150px;
  }

  .status-chip {
    min-width: 88px;
    justify-content: center;
  }

  .task-card {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 9px;
    padding: 12px 10px;
  }

  .task-code {
    width: 38px;
    height: 38px;
  }

  .task-button {
    min-width: 68px;
    padding-right: 9px;
    padding-left: 9px;
  }

  .module-tile {
    min-height: 132px;
    padding: 14px;
  }

  .workflow-form {
    padding: 14px;
  }

  .form-grid.two-columns {
    grid-template-columns: 1fr;
  }
}

@media (orientation: landscape) and (max-height: 600px) {
  .dialog-header {
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .dialog-body {
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .workflow-form {
    padding: 14px;
  }

  .workflow-receiving .form-grid.two-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
