:root {
  color-scheme: light;
  --bg: #eef4f3;
  --panel: #ffffff;
  --panel-alt: #f2f6f4;
  --text: #18212b;
  --muted: #5a6878;
  --accent: #0f766e;
  --accent-strong: #0b5f59;
  --border: #d8e0ea;
  --shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.06);
  --surface-glass: rgba(255, 255, 255, 0.78);
  --surface-gradient: linear-gradient(180deg, #ffffff 0%, #f5f8fa 100%);
  --surface-hover: #eff8f6;
  --surface-border-strong: #cfe5df;
  --surface-input: #ffffff;
  --surface-backdrop: rgba(7, 12, 19, 0.45);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d151c;
  --panel: #13202a;
  --panel-alt: #182833;
  --text: #edf4fb;
  --muted: #9eb0c0;
  --accent: #2cc7b3;
  --accent-strong: #86f0df;
  --border: #28404d;
  --shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
  --shadow-soft: 0 10px 24px rgba(0, 0, 0, 0.24);
  --surface-glass: rgba(19, 32, 42, 0.82);
  --surface-gradient: linear-gradient(180deg, #182833 0%, #13202a 100%);
  --surface-hover: #1b313d;
  --surface-border-strong: #315162;
  --surface-input: #101b23;
  --surface-backdrop: rgba(0, 0, 0, 0.64);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  padding-bottom: env(safe-area-inset-bottom, 0);
  background:
    radial-gradient(circle at top, rgba(15, 118, 110, 0.1), transparent 24%),
    linear-gradient(180deg, #f5f8fb 0%, var(--bg) 100%);
  color: var(--text);
}

:root[data-theme="dark"] body {
  background:
    radial-gradient(circle at top, rgba(44, 199, 179, 0.12), transparent 22%),
    linear-gradient(180deg, #111a22 0%, var(--bg) 100%);
}

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

.app-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.home-topbar {
  position: relative;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid var(--surface-border-strong);
  border-radius: 22px;
  background: var(--surface-glass);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-soft);
}

.home-brand {
  display: grid;
  gap: 4px;
}

.home-brand .eyebrow {
  margin: 0;
}

.home-brand strong {
  font-size: 1rem;
}

.home-menu {
  position: relative;
}

.build-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--surface-border-strong);
  border-radius: 999px;
  background: var(--surface-hover);
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.home-menu-toggle {
  display: inline-grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-gradient);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
}

.home-menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: var(--accent-strong);
}

.home-menu-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 60;
  display: grid;
  gap: 12px;
  min-width: 320px;
  padding: 14px;
  border: 1px solid var(--surface-border-strong);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 249, 0.98));
  box-shadow: 0 22px 42px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(18px);
}

:root[data-theme="dark"] .home-menu-dropdown {
  background:
    linear-gradient(180deg, rgba(19, 32, 42, 0.98), rgba(15, 25, 33, 0.98));
}

.home-menu-section {
  display: grid;
  gap: 8px;
}

.home-menu-section + .home-menu-section {
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.home-menu-dropdown[hidden] {
  display: none;
}

.home-menu-item,
.home-submenu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px 15px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: var(--panel-alt);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.home-menu-item:hover,
.home-submenu-item:hover {
  background: var(--surface-hover);
  border-color: var(--surface-border-strong);
  color: var(--accent-strong);
  transform: translateY(-1px);
}

.home-menu-item-title {
  display: block;
  min-width: 0;
}

.home-menu-item-caret {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--accent);
  font-size: 1rem;
  font-weight: 900;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.home-menu-item[aria-expanded="true"] .home-menu-item-caret {
  transform: rotate(45deg);
}

.home-submenu {
  display: grid;
  gap: 8px;
  margin: 2px 0 0;
  padding: 8px 0 0 14px;
  border-left: 2px solid var(--surface-border-strong);
}

.home-submenu[hidden] {
  display: none;
}

.home-submenu-item {
  background: transparent;
  border-color: var(--border);
}

.store-selector-copy {
  margin-bottom: 18px;
}

.store-selector-grid {
  display: grid;
  gap: 12px;
}

.store-selector-option {
  min-height: 54px;
  padding: 14px 16px;
  border: 1px solid var(--surface-border-strong);
  border-radius: 16px;
  background: var(--surface-gradient);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.store-selector-option:hover {
  transform: translateY(-1px);
  border-color: #7ac2b8;
  box-shadow: 0 16px 28px rgba(15, 118, 110, 0.12);
}

.hero {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.12), transparent 24%),
    linear-gradient(135deg, #ffffff 0%, #edf7f5 100%);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-strong);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-kicker {
  margin: 0 0 10px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #2f6a62;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
}

.subtitle {
  max-width: 620px;
  margin: 14px 0 0;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--muted);
}

.hero-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 14px;
  border: 1px solid #d7ebe5;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--accent-strong);
  font-size: 0.88rem;
  font-weight: 700;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 22px;
}

.module-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  min-height: 220px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface-gradient);
  box-shadow: var(--shadow);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.module-card-main {
  display: grid;
  gap: 18px;
}

.module-card--group {
  gap: 18px;
}

.module-card-group-links {
  display: grid;
  gap: 12px;
}

.module-subcard {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--surface-border-strong);
  border-radius: 18px;
  background: var(--surface-gradient);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.module-subcard--button {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.module-subcard:hover,
.module-subcard:focus-visible {
  transform: translateY(-2px);
  border-color: #8ccdc3;
  box-shadow: 0 16px 28px rgba(15, 118, 110, 0.12);
  outline: none;
}

.module-subcard-copy {
  display: grid;
  gap: 6px;
}

.module-subcard-copy strong {
  font-size: 1rem;
  line-height: 1.2;
}

.module-subcard-copy span {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.35;
}

.entry-hub-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.entry-hub-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  align-items: start;
  min-height: 220px;
  padding: 20px;
  overflow: hidden;
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(15, 118, 110, 0.11), transparent 42%),
    linear-gradient(145deg, #ffffff 0%, #f6fbfa 100%);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.entry-hub-card::after {
  content: "";
  position: absolute;
  right: -24px;
  bottom: -32px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(15, 118, 110, 0.05);
  pointer-events: none;
}

.entry-hub-card .module-subcard-copy {
  align-self: end;
  gap: 9px;
  padding-right: 4px;
}

.entry-hub-card .module-subcard-copy strong {
  color: #123b38;
  font-size: 1.08rem;
}

.entry-hub-card .module-subcard-copy span {
  font-size: 0.86rem;
  line-height: 1.45;
}

.entry-hub-icon {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 17px;
  color: #fff;
  box-shadow: 0 10px 20px rgba(15, 118, 110, 0.2);
}

.entry-hub-icon svg {
  width: 27px;
  height: 27px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.entry-hub-icon--receiving {
  background: linear-gradient(135deg, #0f8b7f, #0b625c);
}

.entry-hub-icon--weighing {
  background: linear-gradient(135deg, #2877b8, #22568c);
  box-shadow: 0 10px 20px rgba(34, 86, 140, 0.2);
}

.entry-hub-icon--search {
  background: linear-gradient(135deg, #8a5bc7, #68409c);
  box-shadow: 0 10px 20px rgba(104, 64, 156, 0.2);
}

.entry-hub-icon--history {
  background: linear-gradient(135deg, #8a5bc7, #68409c);
  box-shadow: 0 10px 20px rgba(104, 64, 156, 0.2);
}

.production-hub-cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.entry-hub-card .module-card-arrow {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  min-height: 36px;
  padding: 0;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
  font-size: 1.15rem;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.entry-hub-card:hover .module-card-arrow,
.entry-hub-card:focus-visible .module-card-arrow {
  transform: translateX(3px);
  background: var(--accent);
  color: #fff;
}

.module-card:hover,
.module-card:focus-visible {
  transform: translateY(-4px);
  border-color: #a9d8d3;
  box-shadow: 0 22px 42px rgba(15, 118, 110, 0.14);
  outline: none;
}

.module-card-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  width: fit-content;
  padding: 0 14px;
  border-radius: 999px;
  background: #edf7f5;
  color: var(--accent-strong);
  font-size: 0.88rem;
  font-weight: 700;
}

.icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: var(--panel-alt);
  color: var(--accent);
}

.icon-wrap svg {
  width: 28px;
  height: 28px;
}

.icon-wrap img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.card-copy {
  display: grid;
  gap: 10px;
}

.card-copy h2 {
  margin: 0;
  font-size: 1.25rem;
}

.card-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.page-shell {
  width: min(900px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 108px;
}

.topbar {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0) + 14px);
  transform: translateX(-50%);
  z-index: 24;
  width: min(900px, calc(100% - 32px));
}

.back-link {
  display: flex;
  width: 100%;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(18px);
  color: var(--accent-strong);
  font-weight: 700;
  box-shadow: var(--shadow-soft);
}

.content-panel {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.page-shell.is-store-pending .content-panel,
.page-shell.is-store-pending .topbar {
  opacity: 0.18;
  pointer-events: none;
}

.content-panel h1 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 2rem;
}

.content-panel p {
  margin: 0 0 24px;
  line-height: 1.6;
  color: var(--muted);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.panel-heading p:last-child {
  margin-bottom: 0;
}

.date-chip {
  min-width: 140px;
  padding: 14px 18px;
  border: 1px solid #b9d9d2;
  border-radius: 12px;
  background: linear-gradient(135deg, #eef9f5 0%, #f7fcfb 100%);
  color: var(--accent-strong);
  font-weight: 700;
  text-align: center;
}

.wizard-panel {
  background:
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.09), transparent 22%),
    var(--panel);
}

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

.step-card {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdfc 100%);
}

.step-badge {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #e8f4f2;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.step-header {
  margin-bottom: 18px;
}

.step-header h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
}

.step-header p {
  margin: 0;
}

.inline-grid {
  display: grid;
  gap: 16px;
}

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

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-weight: 700;
  color: var(--text);
}

.field input,
.field select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-input);
  color: var(--text);
  font: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field input:focus,
.field select:focus {
  border-color: #62b8ae;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
  outline: none;
}

.field--compact {
  max-width: 340px;
}

.field--top-spacing {
  margin-top: 18px;
}

.helper-text {
  margin: 12px 0 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.product-lines {
  display: grid;
  gap: 16px;
}

.product-card {
  padding: 18px;
  border: 1px solid #d7e7e2;
  border-radius: 16px;
  background: #f8fbfa;
}

.product-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.product-card-header h3 {
  margin: 0;
  font-size: 1.05rem;
}

.ghost-button,
.secondary-action,
.primary-action {
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.ghost-button {
  padding: 10px 14px;
  background: var(--panel-alt);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(24, 33, 43, 0.03);
}

.secondary-action {
  margin-top: 18px;
  padding: 14px 18px;
  background: var(--surface-hover);
  color: var(--accent-strong);
}

.primary-action {
  padding: 15px 22px;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 14px 28px rgba(15, 118, 110, 0.24);
}

.ghost-button:hover,
.secondary-action:hover,
.primary-action:hover {
  transform: translateY(-1px);
}

.primary-action:hover {
  background: var(--accent-strong);
}

.leave-confirm-button {
  background: #b42318;
  box-shadow: 0 14px 28px rgba(180, 35, 24, 0.2);
}

.leave-confirm-button:hover {
  background: #8f1d14;
}

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

.summary-card {
  padding: 20px;
  border: 1px solid #dbe8e4;
  border-radius: 16px;
  background: #f7fbfa;
}

.summary-label {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.summary-value {
  display: block;
  margin-bottom: 8px;
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.1;
  color: #0b5f59;
}

.summary-highlight {
  margin-bottom: 18px;
  padding: 18px 20px;
  border: 1px solid #bfe2da;
  border-radius: 18px;
  background: linear-gradient(135deg, #e9f7f3 0%, #ffffff 100%);
}

.summary-highlight span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent-strong);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.summary-highlight strong {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  line-height: 1;
  color: #0b5f59;
}

.summary-empty {
  margin: 0;
  color: var(--muted);
}

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

.summary-meta p,
.summary-list li {
  color: var(--text);
}

.summary-meta strong {
  color: var(--accent-strong);
}

.summary-reference-edit {
  display: flex;
  align-items: center;
}

.summary-link-button {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  font-size: 0.84rem;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 0.14em;
  cursor: pointer;
}

.summary-date-panel {
  grid-column: 1 / -1;
}

.summary-date-panel .field {
  margin: 0;
  max-width: 240px;
}

.requester-preset-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.requester-preset-item {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d7e4e0;
  border-radius: 999px;
  background: #f7fbfa;
  overflow: hidden;
}

.requester-preset-button,
.requester-remove-button {
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
}

.requester-preset-button {
  padding: 10px 14px;
  color: var(--text);
  cursor: pointer;
}

.requester-preset-button.is-active {
  background: #e7f6f2;
  color: var(--accent-strong);
  font-weight: 700;
}

.requester-remove-button {
  padding: 10px 12px 10px 8px;
  color: #8c1d18;
  cursor: pointer;
}

.summary-list {
  margin: 0;
  padding-left: 18px;
}

.summary-list li + li {
  margin-top: 10px;
}

.actions-row {
  display: flex;
  justify-content: flex-start;
  margin-top: 22px;
}

.status-message {
  min-height: 24px;
  margin-top: 18px;
  font-weight: 700;
}

.status-message[data-tone="error"] {
  color: #b42318;
}

.status-message[data-tone="success"] {
  color: #0f766e;
}

.status-message:not(:empty) {
  padding: 14px 16px;
  border: 1px solid currentColor;
  border-radius: 14px;
  background: #fff;
  line-height: 1.45;
}

.status-message[data-tone="success"]:not(:empty) {
  border-color: #9fd5ca;
  background: #eef9f6;
}

.status-message[data-tone="error"]:not(:empty) {
  border-color: #efb0aa;
  background: #fff3f2;
}

.helper-text[data-tone="error"] {
  color: #b42318;
}

.helper-text[data-tone="success"] {
  color: #0f766e;
}

.wizard-panel--pix {
  width: min(760px, 100%);
  margin: 0 auto;
}

.panel-heading--stacked {
  display: block;
}

.panel-heading--stacked p:last-child {
  margin-bottom: 0;
}

.storage-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #cfe4df;
  border-radius: 20px;
  background: linear-gradient(135deg, #f4fbf9 0%, #ffffff 100%);
}

.storage-banner strong {
  display: block;
  margin-bottom: 6px;
  color: var(--accent-strong);
}

.storage-banner p {
  margin: 0;
}

.catalog-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid #d9d6f5;
  border-radius: 20px;
  background: linear-gradient(135deg, #f7f5ff 0%, #ffffff 100%);
}

.catalog-banner strong {
  display: block;
  margin-bottom: 6px;
  color: #5b36a8;
}

.catalog-banner p {
  margin: 0;
  color: var(--muted);
}

.catalog-banner__actions {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}

.catalog-banner__actions .secondary-action {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.primary-action--small {
  padding: 10px 14px;
}

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

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

.progress-pill {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #f6f8fb;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease,
    color 160ms ease, box-shadow 160ms ease;
}

.progress-pill.is-active {
  border-color: #7ac2b8;
  background: #e9f7f3;
  color: var(--accent-strong);
  box-shadow: 0 10px 20px rgba(15, 118, 110, 0.12);
}

.progress-pill.is-done {
  border-color: #cce5df;
  background: #f1fbf8;
  color: #2f6a62;
}

.wizard-form--single {
  position: relative;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}

.step-screen {
  display: none;
  min-width: 0;
}

.step-screen.is-active {
  display: block;
}

.step-card--full {
  min-height: 0;
}

.actions-row--between {
  justify-content: space-between;
  align-items: center;
}

.step-spacer {
  display: block;
  width: 1px;
  height: 1px;
}

.inline-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 18px;
}

.production-category-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 18px;
}

#receiving-category-filters {
  grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
}

#receiving-category-filters:empty {
  display: none;
}

.production-category-filter {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #cfe2de;
  border-radius: 14px;
  background: #f8fbfa;
  color: #35645e;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease,
    box-shadow 160ms ease;
}

.production-category-filter:hover,
.production-category-filter.is-active {
  border-color: #0f766e;
  background: #0f766e;
  color: #fff;
  box-shadow: 0 10px 22px rgba(15, 118, 110, 0.18);
}

.secondary-action--small {
  margin-top: 0;
  padding: 10px 14px;
}

.field-label {
  margin: 0 0 12px;
  font-weight: 700;
  color: var(--text);
}

.inline-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.product-builder {
  display: grid;
  gap: 20px;
}

.product-selector-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.product-tile {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #d7e7e2;
  border-radius: 18px;
  background: #fff;
  text-align: center;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.product-tile img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 16px;
  background: #f3f5f8;
}

.product-tile span {
  font-weight: 700;
  color: var(--text);
}

.product-tile--name-only {
  min-height: 88px;
  place-items: center;
  padding: 18px;
}

.product-tile:hover,
.product-tile.is-selected {
  transform: translateY(-2px);
  border-color: #7ac2b8;
  box-shadow: 0 18px 34px rgba(15, 118, 110, 0.14);
}

.receiving-product-selector-grid .product-tile {
  position: relative;
}

.receiving-product-selector-grid .product-tile.is-selected {
  transform: translateY(-3px);
  border: 2px solid #0f766e;
  background: linear-gradient(180deg, #ffffff 0%, #e9f8f5 100%);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.16), 0 20px 38px rgba(15, 118, 110, 0.22);
}

.receiving-product-selector-grid .product-tile.is-selected::after {
  content: "✓";
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #0f766e;
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
  box-shadow: 0 6px 16px rgba(15, 118, 110, 0.32);
}

.receiving-product-selector-grid .product-tile.is-selected span {
  color: #0b5f59;
  font-weight: 800;
}

.product-catalog-action {
  margin-top: 14px;
  margin-bottom: 0;
}

.product-edit-card {
  padding: 18px;
  border: 1px solid #d7e7e2;
  border-radius: 18px;
  background: #f8fbfa;
}

.product-details-modal {
  width: min(720px, calc(100% - 32px));
}

.product-details-modal .product-edit-card {
  border: 0;
  border-radius: 20px;
  background: #fff;
}

.product-details-modal .product-edit-header {
  align-items: flex-start;
}

.product-details-modal .product-edit-header h2 {
  margin: 0 0 6px;
}

.product-details-modal .product-edit-header p:last-child {
  margin: 0;
}

.quantity-input-wrap {
  position: relative;
}

.quantity-input-wrap input {
  width: 100%;
  padding-right: 54px;
}

.quantity-input-unit {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  padding-left: 10px;
  border-left: 1px solid #d1ddd9;
  color: var(--accent-strong);
  font-size: 0.9rem;
  font-weight: 800;
  pointer-events: none;
}

.product-edit-header h3 {
  margin: 0 0 6px;
}

.product-edit-header p {
  margin-bottom: 18px;
}

.add-product-action {
  width: 100%;
  min-height: 56px;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  background: linear-gradient(135deg, #0f8b7f 0%, #0b625c 100%);
  box-shadow: 0 16px 30px rgba(15, 118, 110, 0.3);
}

.add-product-action::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-right: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  font-size: 1.25rem;
  line-height: 1;
}

.add-product-action:hover {
  background: linear-gradient(135deg, #0d7d73 0%, #084f4a 100%);
  box-shadow: 0 19px 34px rgba(15, 118, 110, 0.36);
}

.selected-products-block {
  margin-top: 22px;
  padding: 20px;
  border: 2px solid #a9d9d1;
  border-radius: 20px;
  background: linear-gradient(135deg, #eefaf7 0%, #f9fdfc 100%);
  box-shadow: 0 14px 30px rgba(15, 118, 110, 0.1);
}

.selected-products-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.selected-products-header h3 {
  margin: 0;
  color: var(--accent-strong);
  font-size: 1.12rem;
}

.selected-products-list {
  display: grid;
  gap: 12px;
}

.selected-product-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid #b9ddd6;
  border-left: 5px solid var(--accent);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.08);
}

.selected-product-card strong {
  color: #0b5f59;
  font-size: 1.02rem;
}

.inline-grid--stretch {
  flex: 1;
}

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

.driver-choice {
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid #cbdad6;
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease,
    box-shadow 160ms ease;
}

.driver-choice:hover:not(:disabled) {
  border-color: var(--accent);
}

.driver-choice.is-selected {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.18);
}

.driver-choice:disabled {
  cursor: default;
  opacity: 1;
}

.selected-product-card p {
  margin: 6px 0 0;
}

.weighing-history-card {
  display: block;
}

.weighing-history-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.weighing-history-card__net {
  flex: 0 0 auto;
  color: var(--accent-strong);
}

.weighing-history-card details {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e3eaef;
}

.weighing-history-card summary {
  color: var(--accent-strong);
  font-weight: 700;
  cursor: pointer;
}

.entry-store-filter-block {
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid #cfe4df;
  border-radius: 18px;
  background: #f7fbfa;
}

.entry-store-filter-block .field-label {
  display: block;
}

.entry-store-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.entry-store-filter {
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid #c8ddd8;
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 750;
  cursor: pointer;
}

.entry-store-filter:hover,
.entry-store-filter.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.16);
}

.entry-history-table {
  overflow: hidden;
  border: 1px solid #d5e5e1;
  border-radius: 16px;
  background: #fff;
}

.balance-toolbar {
  margin-bottom: 18px;
}

.balance-toolbar-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

.balance-toolbar-card .secondary-action {
  align-self: flex-start;
}

.balance-toolbar-card .summary-value {
  line-height: 1.3;
}

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

.balance-table-wrap {
  overflow-x: auto;
}

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

.balance-table th,
.balance-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #dbe8e4;
  text-align: left;
  vertical-align: top;
}

.balance-table th {
  color: var(--accent-strong);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.balance-table td[data-tone="error"] {
  color: #b42318;
  font-weight: 700;
}

.balance-table td[data-tone="success"] {
  color: #087052;
  font-weight: 700;
}

.balance-yield-list {
  display: grid;
  gap: 16px;
}

.balance-yield-card {
  display: grid;
  gap: 16px;
}

.balance-yield-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.balance-yield-card-header strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1rem;
}

.balance-yield-rows {
  display: grid;
  gap: 12px;
}

.balance-yield-row {
  padding: 14px;
  border: 1px solid #dbe8e4;
  border-radius: 14px;
  background: #ffffff;
}

.balance-yield-input-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.entry-history-row {
  display: grid;
  grid-template-columns: 110px minmax(150px, 0.9fr) minmax(180px, 1.2fr) 82px;
  gap: 16px;
  align-items: center;
  min-height: 52px;
  padding: 12px 16px;
  border-bottom: 1px solid #e3ece9;
}

.entry-edit-action {
  padding: 8px 10px;
  border: 1px solid var(--accent);
  border-radius: 9px;
  background: #fff;
  color: var(--accent-strong);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}

.entry-edit-action:hover {
  background: var(--accent);
  color: #fff;
}

.entry-delete-action {
  padding: 11px 14px;
  border: 1px solid #dc2626;
  border-radius: 10px;
  background: #fff;
  color: #b91c1c;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

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

.entry-history-row--header {
  min-height: 44px;
  background: #eaf7f4;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.entry-history-row strong {
  color: #123b38;
}

@media (max-width: 680px) {
  .entry-store-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .entry-history-row--header {
    display: none;
  }

  .entry-history-row {
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 14px;
  }

  .entry-history-row [data-label]::before {
    content: attr(data-label) ": ";
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
  }
}

.weighing-history-card details .summary-meta,
.weighing-history-card details .summary-list {
  margin-top: 14px;
}

.production-history-card__content {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.production-history-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.production-history-card__meta span {
  overflow-wrap: anywhere;
}

.production-history-list + .status-message {
  margin-top: 18px;
}

.production-history-month {
  margin-bottom: 20px;
}

.app-modal {
  width: min(680px, calc(100% - 32px));
  border: 0;
  padding: 0;
  border-radius: 20px;
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.24);
}

.app-modal--store {
  width: min(420px, calc(100% - 24px));
}

.app-modal::backdrop {
  background: var(--surface-backdrop);
}

.duplicate-catalog-card {
  max-width: 520px;
}

.duplicate-catalog-card .helper-text {
  margin: 4px 0 0;
  font-size: 1rem;
  color: var(--text);
}

.sync-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(12, 21, 33, 0.42);
}

.sync-overlay.is-visible {
  display: grid;
}

.sync-overlay-card {
  width: min(320px, 100%);
  padding: 28px 24px;
  border-radius: 24px;
  background: color-mix(in srgb, var(--panel) 96%, transparent);
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.24);
  text-align: center;
}

.sync-overlay-card p {
  margin: 16px 0 0;
  font-weight: 700;
  color: var(--accent-strong);
}

.sync-spinner {
  width: 62px;
  height: 62px;
  margin: 0 auto;
  border: 5px solid rgba(15, 118, 110, 0.14);
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: sync-spin 0.85s linear infinite;
}

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

.modal-card {
  padding: 24px;
  background: var(--panel);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 22px;
}

.modal-header h2 {
  margin: 0;
}

.placeholder-list {
  display: grid;
  gap: 14px;
}

.placeholder-item {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fafcfd;
}

.placeholder-item strong {
  display: block;
  margin-bottom: 6px;
}

@media (max-width: 900px) {
  body {
    background:
      radial-gradient(circle at top, rgba(15, 118, 110, 0.14), transparent 34%),
      linear-gradient(180deg, #f7fbfc 0%, #edf5f4 100%);
  }

  .card-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .app-shell {
    width: min(100%, calc(100% - 16px));
    padding: 10px 0 28px;
  }

  .home-topbar {
    position: sticky;
    top: 8px;
    z-index: 15;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand menu"
      "build build";
    align-items: center;
    gap: 10px 12px;
    margin-bottom: 12px;
    padding: 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.1);
  }

  .home-brand {
    grid-area: brand;
  }

  .home-menu {
    grid-area: menu;
    justify-self: end;
  }

  .build-badge {
    grid-area: build;
    width: 100%;
    justify-content: center;
    min-height: 34px;
    padding: 7px 10px;
    font-size: 0.75rem;
  }

  .home-menu-dropdown {
    gap: 10px;
    min-width: min(320px, calc(100vw - 28px));
    right: 0;
    border-radius: 18px;
  }

  .home-menu-toggle {
    min-width: 48px;
    min-height: 48px;
    place-items: center;
    padding: 10px;
  }

  .home-menu-item,
  .home-submenu-item {
    min-height: 48px;
    padding: 14px;
  }

  .module-card {
    min-height: 0;
    padding: 16px;
    gap: 14px;
    border-radius: 20px;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
  }

  .module-card-main {
    grid-template-columns: 52px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
  }

  .module-card--group {
    gap: 12px;
  }

  .module-card-group-links {
    gap: 10px;
  }

  .entry-hub-cards {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .production-hub-cards {
    grid-template-columns: 1fr;
  }

  .entry-hub-card {
    grid-template-columns: 48px minmax(0, 1fr) 36px;
    grid-template-rows: auto;
    align-items: center;
    min-height: 0;
    padding: 15px;
  }

  .entry-hub-card .entry-hub-icon {
    width: 46px;
    height: 46px;
    border-radius: 15px;
  }

  .entry-hub-card .module-subcard-copy {
    align-self: center;
    padding: 0 8px;
  }

  .entry-hub-card .module-card-arrow {
    position: static;
    width: 34px;
    min-height: 34px;
    padding: 0;
    justify-self: end;
  }

  .module-subcard {
    align-items: stretch;
    padding: 12px;
    border-radius: 16px;
  }

  .module-subcard-copy strong {
    font-size: 0.96rem;
  }

  .module-subcard-copy span {
    font-size: 0.82rem;
  }

  .module-card-arrow {
    width: 100%;
    justify-content: center;
    min-height: 44px;
    font-size: 0.84rem;
  }

  .card-copy h2 {
    font-size: 1.05rem;
    line-height: 1.15;
  }

  .card-copy p {
    font-size: 0.88rem;
    line-height: 1.35;
  }

  .icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 16px;
  }

  .icon-wrap svg {
    width: 24px;
    height: 24px;
  }

  .icon-wrap img {
    width: 26px;
    height: 26px;
  }

  .page-shell {
    width: min(100%, calc(100% - 16px));
    padding: 8px 0 92px;
  }

  .topbar {
    width: min(100%, calc(100% - 16px));
    bottom: calc(env(safe-area-inset-bottom, 0) + 10px);
  }

  .back-link {
    justify-content: center;
    min-height: 46px;
    padding: 12px 14px;
    border-radius: 16px;
  }

  .content-panel {
    padding: 16px;
    border-radius: 22px;
  }

  .content-panel h1 {
    margin-bottom: 6px;
    font-size: 1.45rem;
    line-height: 1.08;
  }

  .step-card {
    padding: 16px;
    border-radius: 18px;
  }

  .step-header h2 {
    font-size: 1.08rem;
    line-height: 1.2;
  }

  .step-header {
    margin-bottom: 14px;
  }

  .step-badge {
    margin-bottom: 10px;
    padding: 6px 10px;
    font-size: 0.72rem;
  }

  .field input,
  .field select {
    min-height: 50px;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 16px;
  }

  .storage-banner {
    padding: 12px;
    border-radius: 18px;
    margin-bottom: 14px;
  }

  .panel-heading,
  .product-card-header {
    flex-direction: column;
    align-items: stretch;
  }

  .panel-heading {
    gap: 8px;
    margin-bottom: 18px;
  }


  .panel-heading .eyebrow {
    margin-bottom: 6px;
  }

  .inline-grid--two,
  .inline-grid--three,
  .product-grid,
  .summary-meta {
    grid-template-columns: 1fr;
  }

  .product-selector-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .production-category-filters {
    grid-auto-flow: column;
    grid-auto-columns: minmax(104px, 1fr);
    grid-template-columns: none;
    overflow-x: auto;
    padding: 2px 2px 8px;
    scrollbar-width: thin;
  }

  .production-category-filter {
    min-height: 42px;
    white-space: nowrap;
    font-size: 0.84rem;
  }

  .progress-strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(108px, 1fr);
    grid-template-columns: none;
    overflow-x: auto;
    padding: 2px 2px 8px;
    margin: 0 -4px 14px;
    padding-inline: 4px;
    scrollbar-width: thin;
  }

  .progress-pill {
    min-height: 42px;
    white-space: nowrap;
    font-size: 0.84rem;
    padding: 10px 12px;
  }

  .product-tile {
    gap: 6px;
    padding: 7px;
    border-radius: 14px;
  }

  .product-tile img {
    border-radius: 10px;
  }

  .product-tile span {
    font-size: 0.74rem;
    line-height: 1.2;
  }

  .product-tile--name-only {
    min-height: 76px;
    padding: 12px 8px;
  }

  .product-edit-card,
  .summary-card {
    padding: 14px;
    border-radius: 16px;
  }

  .selected-products-block {
    margin-top: 18px;
    padding: 14px;
  }

  .selected-products-header {
    margin-bottom: 12px;
  }

  .date-chip {
    width: 100%;
  }

  .selected-products-header,
  .selected-product-card,
  .modal-header,
  .actions-row--between,
  .storage-banner,
  .catalog-banner,
  .catalog-banner__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .catalog-banner__actions .secondary-action,
  .catalog-banner__actions .primary-action {
    justify-content: center;
    width: 100%;
    min-height: 46px;
  }

  .actions-row--between .ghost-button,
  .actions-row--between .secondary-action,
  .actions-row--between .primary-action {
    width: 100%;
    min-height: 48px;
  }

  .field--compact {
    max-width: none;
  }

  .selected-product-card {
    padding: 14px;
    border-radius: 16px;
  }

  .selected-product-card .ghost-button {
    min-height: 42px;
  }

  .secondary-action,
  .primary-action,
  .ghost-button {
    border-radius: 14px;
  }

  .secondary-action {
    padding: 13px 16px;
  }

  .primary-action {
    padding: 14px 18px;
    box-shadow: 0 12px 22px rgba(15, 118, 110, 0.2);
  }

  .inline-actions {
    justify-content: stretch;
    margin-bottom: 14px;
  }

  .inline-actions .secondary-action--small {
    width: 100%;
    min-height: 44px;
    padding: 11px 14px;
  }

  .helper-text {
    font-size: 0.88rem;
    line-height: 1.35;
  }

  .summary-highlight {
    padding: 16px;
    border-radius: 16px;
  }

  .summary-highlight strong {
    font-size: clamp(1.55rem, 8vw, 2.1rem);
  }

  .app-modal {
    width: min(100%, calc(100% - 16px));
    border-radius: 22px;
  }

  .modal-card {
    padding: 18px;
  }

  .modal-header {
    margin-bottom: 16px;
  }

  .sync-overlay-card {
    width: min(280px, 100%);
    padding: 22px 18px;
    border-radius: 20px;
  }

  .sync-spinner {
    width: 52px;
    height: 52px;
  }
}

@media (max-width: 600px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .page-shell {
    width: calc(100% - 12px);
    padding: 6px 0 20px;
  }

  .topbar {
    width: min(100%, calc(100% - 16px));
    bottom: calc(env(safe-area-inset-bottom, 0) + 8px);
  }

  .back-link {
    min-height: 44px;
    padding: 10px 12px;
  }

  .content-panel {
    padding: 12px;
    border-radius: 18px;
  }

  .panel-heading {
    margin-bottom: 14px;
  }

  .content-panel h1 {
    font-size: 1.35rem;
    line-height: 1.12;
  }

  .storage-banner {
    gap: 8px;
    padding: 11px;
    border-radius: 14px;
  }

  .storage-banner strong {
    margin-bottom: 4px;
    font-size: 0.9rem;
  }

  .storage-banner p {
    font-size: 0.82rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }

  .progress-strip {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
    margin: 0 0 12px;
    padding: 0;
  }

  .progress-pill {
    min-width: 0;
    min-height: 42px;
    padding: 9px 7px;
    white-space: normal;
    font-size: 0.78rem;
    line-height: 1.15;
  }

  .step-card {
    width: 100%;
    min-width: 0;
    padding: 12px;
    border-radius: 16px;
  }

  .step-header {
    margin-bottom: 12px;
  }

  .step-header h2 {
    font-size: 1rem;
    line-height: 1.25;
  }

  .production-category-filters {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
    margin-bottom: 12px;
    padding: 0;
  }

  .production-category-filter {
    min-width: 0;
    min-height: 44px;
    padding: 9px 8px;
    white-space: normal;
    font-size: 0.82rem;
  }

  .inline-actions {
    margin-bottom: 12px;
  }

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

  .product-tile--name-only {
    min-width: 0;
    min-height: 72px;
    padding: 10px 7px;
  }

  .product-tile span {
    font-size: 0.76rem;
    line-height: 1.22;
    overflow-wrap: anywhere;
  }

  .product-edit-card,
  .summary-card {
    padding: 12px;
    border-radius: 14px;
  }

  .product-edit-header h3 {
    font-size: 1rem;
    overflow-wrap: anywhere;
  }

  .field {
    min-width: 0;
  }

  .field input,
  .field select {
    width: 100%;
    min-width: 0;
  }

  .actions-row {
    gap: 10px;
  }

  .actions-row--between .ghost-button,
  .actions-row--between .secondary-action,
  .actions-row--between .primary-action {
    min-height: 48px;
  }

  .summary-meta,
  .summary-list,
  .summary-list li,
  .status-message {
    overflow-wrap: anywhere;
  }

  .app-modal {
    width: calc(100% - 12px);
    max-height: calc(100dvh - 12px);
    border-radius: 18px;
    overflow-y: auto;
  }

  .modal-card {
    padding: 14px;
  }

  .modal-header h2 {
    font-size: 1.2rem;
  }
}
