.cgw-app,
.cgw-ui-scope {
  --cgw-nav-active: #2f2a70;
  --cgw-nav-idle: #1bb7b8;
  --cgw-nav-text: #ffffff;
  --cgw-soft-btn-bg: #ffffff;
  --cgw-soft-btn-text: #2f2a70;
  --cgw-soft-btn-border: #d7e7ef;
  --cgw-save-btn-bg: #2f2a70;
  --cgw-save-btn-text: #ffffff;
  --cgw-save-btn-border: #2f2a70;
  --cgw-new-btn-bg: #22c55e;
  --cgw-new-btn-text: #ffffff;
  --cgw-new-btn-border: #22c55e;
  --cgw-duplicate-btn-bg: #f2efff;
  --cgw-duplicate-btn-text: #5347b8;
  --cgw-duplicate-btn-border: #d8d0ff;
  --cgw-delete-btn-bg: #fff7f7;
  --cgw-delete-btn-text: #cf3b3b;
  --cgw-delete-btn-border: #f3baba;
  --cgw-cloud-btn-bg: #ff8a24;
  --cgw-cloud-btn-text: #ffffff;
  --cgw-cloud-btn-border: #ff8a24;
  --cgw-warehouse-btn-bg: #0f9f8f;
  --cgw-warehouse-btn-text: #ffffff;
  --cgw-warehouse-btn-border: #0f9f8f;
  --cgw-surface-bg: #f7fbff;
  --cgw-card-bg: #ffffff;
  --cgw-title-color: #2f2a70;
  --cgw-text-color: #223142;
  --cgw-border-color: #d7e7ef;
  --cgw-muted: #5d6c7d;
  --cgw-danger: #cf3b3b;
  --cgw-shadow: 0 18px 40px rgba(20, 55, 95, 0.08);
  max-width: 1480px;
  margin: 24px auto;
  color: var(--cgw-text-color);
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
}

body.cgw-standalone {
  margin: 0;
  background: linear-gradient(180deg, #f2f9fc 0%, #eaf5fb 100%);
}

.cgw-shell {
  min-height: 100vh;
  padding: 24px;
}

.cgw-shell__inner {
  max-width: 1540px;
  margin: 0 auto;
}

.cgw-shell__top {
  margin-bottom: 16px;
}

.cgw-shell__top h1 {
  margin: 6px 0 0;
  color: var(--cgw-text-color);
  font-size: clamp(28px, 4vw, 42px);
}

.cgw-shell__eyebrow,
.cgw-app__eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(27, 183, 184, 0.12);
  color: #0e8d8f;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.cgw-app * {
  box-sizing: border-box;
}

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

.cgw-main--full {
  grid-column: 1 / -1;
}

.cgw-sidebar,
.cgw-main,
.cgw-theme-grid,
.cgw-ingredients-list,
.cgw-recipes-list,
.cgw-warehouse-list,
.cgw-cloud-search__results,
.cgw-allergen-grid,
.cgw-recipe-builder__rows,
.cgw-section-grid {
  display: grid;
  gap: 14px;
}

.cg-card,
.cgw-panel,
.cgw-savebar,
.cgw-guard,
.cgw-app__hero {
  border: 1px solid var(--cgw-border-color);
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, var(--cgw-surface-bg) 100%);
  box-shadow: var(--cgw-shadow);
}

.cg-card,
.cgw-panel,
.cgw-savebar,
.cgw-guard,
.cgw-app__hero {
  padding: 18px;
}

.cg-card__head,
.cgw-item-card__head,
.cgw-recipe-builder__head,
.cgw-savebar {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
}

.cgw-sidebar__brand {
  display: flex;
  gap: 16px;
  align-items: center;
}

.cgw-card__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.cgw-app__logo {
  width: 92px;
  height: 92px;
  object-fit: contain;
  flex: 0 0 92px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid var(--cgw-border-color);
  padding: 8px;
  box-shadow: 0 16px 30px rgba(27, 183, 184, 0.16);
}

.cgw-app__hero--top {
  padding: 24px 28px;
}

.cgw-app__hero-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cgw-app__hero-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1 1 620px;
  min-width: 0;
}

.cgw-app__hero-copy {
  min-width: 0;
}

.cgw-app__hero-copy h2 {
  margin: 0;
  color: var(--cgw-title-color);
  font-size: clamp(34px, 4.2vw, 52px);
  line-height: 1.05;
}

.cgw-brand-tm {
  display: inline-block;
  margin-left: 0;
  font-size: 0.28em;
  line-height: 1;
  vertical-align: super;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.cgw-app__hero-copy p {
  margin: 10px 0 0;
  max-width: 760px;
}

.cgw-sidebar__brand-copy h2,
.cgw-app__hero h3,
.cg-card__head h3,
.cgw-item-card__head h4,
.cgw-savebar__copy h4 {
  margin: 8px 0 0;
  color: var(--cgw-title-color);
}

.cgw-sidebar__brand-copy p,
.cgw-app__hero p,
.cg-card__head p,
.cgw-item-card__head p,
.cgw-savebar__copy p,
.cgw-empty,
.cgw-lab-preview__text,
.cgw-guard p {
  margin: 8px 0 0;
  color: var(--cgw-muted);
  line-height: 1.6;
}

.cgw-app__hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 0;
  justify-content: flex-end;
  flex: 0 1 560px;
  align-items: flex-start;
  align-content: flex-start;
}

.cgw-app__pill,
.cgw-savebar__status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--cgw-border-color);
  color: var(--cgw-title-color);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  flex: 0 0 auto;
  width: auto;
  max-width: 100%;
  text-align: center;
}

.cgw-app__security {
  flex: 1 1 100%;
  margin-top: 4px;
  border: 1px solid #ffd6b3;
  border-left: 5px solid #ff8a24;
  background: linear-gradient(180deg, #fff9f3 0%, #fff4e8 100%);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 10px 18px rgba(255, 138, 36, 0.12);
}

.cgw-app__hero-layout > .cgw-app__security {
  flex: 1 1 100%;
  width: min(100%, 980px);
}

.cgw-app__security h4 {
  margin: 0;
  color: #9b3f00;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cgw-app__security-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.45);
  animation: cgwSecurityPulse 1.5s ease-in-out infinite;
}

.cgw-app__security-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 12px;
  margin-top: 8px;
}

.cgw-app__security-item {
  color: #2f2a70;
  font-size: 13px;
  line-height: 1.35;
}

.cgw-app__security-note {
  margin: 8px 0 0;
  color: #7b4f1a;
  font-size: 12px;
}

.cgw-app__security-warning {
  margin: 8px 0 0;
  color: #8c1c13;
  font-size: 12px;
  font-weight: 700;
}

.cgw-api-token {
  margin-top: 10px;
}

.cgw-api-token__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.cgw-api-token__actions .cg-btn {
  margin: 0;
}

.cgw-app__security-flag {
  margin: 8px 0 0;
  color: #b11226;
  font-size: 12px;
  font-weight: 700;
}

.cgw-app__security.is-alert {
  border-left-color: #d90429;
  border-color: #f0b2be;
  background: linear-gradient(180deg, #fff5f7 0%, #ffeef1 100%);
  box-shadow: 0 10px 18px rgba(190, 24, 93, 0.14);
}

.cgw-app__security.is-alert .cgw-app__security-dot {
  background: #d90429;
  box-shadow: 0 0 0 0 rgba(217, 4, 41, 0.42);
}

@keyframes cgwSecurityPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.45);
  }
  70% {
    transform: scale(1.12);
    box-shadow: 0 0 0 8px rgba(22, 163, 74, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cgw-app__security-dot {
    animation: none;
  }
}

.cgw-app__nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.cg-btn,
.cg-mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  font: inherit;
}

.cg-btn {
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--cgw-nav-active) 0%, var(--cgw-nav-active) 100%);
  color: var(--cgw-nav-text);
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(47, 42, 112, 0.14);
  font-size: 13px;
  line-height: 1.2;
}

.cg-btn,
.cg-btn:hover,
.cg-btn:focus,
.cg-btn:visited {
  color: var(--cgw-nav-text);
}

.cgw-app__nav .cg-btn {
  background: linear-gradient(135deg, var(--cgw-nav-idle) 0%, var(--cgw-nav-idle) 100%);
  color: var(--cgw-nav-text) !important;
  -webkit-text-fill-color: var(--cgw-nav-text) !important;
  min-height: 36px;
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(47, 42, 112, 0.14);
}

.cgw-app__nav .cg-btn.is-active,
.cg-btn--primary {
  background: linear-gradient(135deg, var(--cgw-nav-active) 0%, var(--cgw-nav-active) 100%);
  color: var(--cgw-nav-text) !important;
  -webkit-text-fill-color: var(--cgw-nav-text) !important;
}

.cgw-app__nav .cg-btn:hover,
.cgw-app__nav .cg-btn:focus,
.cgw-app__nav .cg-btn:visited,
.cgw-app__nav .cg-btn.is-active:hover,
.cgw-app__nav .cg-btn.is-active:focus,
.cgw-app__nav .cg-btn.is-active:visited,
.cg-btn--primary:hover,
.cg-btn--primary:focus,
.cg-btn--primary:visited {
  color: var(--cgw-nav-text) !important;
  -webkit-text-fill-color: var(--cgw-nav-text) !important;
}

.cgw-app__nav .cg-btn,
.cgw-app__nav .cg-btn *,
.cgw-app__nav .cg-btn.is-active,
.cgw-app__nav .cg-btn.is-active *,
.cg-btn--primary,
.cg-btn--primary * {
  color: var(--cgw-nav-text) !important;
  -webkit-text-fill-color: var(--cgw-nav-text) !important;
}

.cg-btn--secondary {
  background: var(--cgw-soft-btn-bg);
  color: var(--cgw-soft-btn-text);
  border: 1px solid var(--cgw-soft-btn-border);
  box-shadow: none;
}

.cg-btn--secondary,
.cg-btn--secondary:hover,
.cg-btn--secondary:focus,
.cg-btn--secondary:visited {
  color: var(--cgw-soft-btn-text);
}

.cg-btn--accent {
  background: var(--cgw-cloud-btn-bg);
  color: var(--cgw-cloud-btn-text);
  border: 1px solid var(--cgw-cloud-btn-border);
  box-shadow: 0 8px 18px rgba(255, 138, 36, 0.16);
}

.cg-btn--accent,
.cg-btn--accent:hover,
.cg-btn--accent:focus,
.cg-btn--accent:visited {
  color: var(--cgw-cloud-btn-text);
}

.cg-btn:hover,
.cg-mini-btn:hover {
  transform: translateY(-1px);
}

.cg-btn:disabled,
.cg-mini-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.cg-mini-btn {
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 12px;
  background: var(--cgw-soft-btn-bg);
  color: var(--cgw-soft-btn-text);
  border: 1px solid var(--cgw-soft-btn-border);
  font-weight: 700;
}

.cg-mini-btn--danger {
  border-color: var(--cgw-delete-btn-border);
  color: var(--cgw-delete-btn-text);
  background: var(--cgw-delete-btn-bg);
}

.cg-mini-btn--copy {
  border-color: var(--cgw-duplicate-btn-border);
  color: var(--cgw-duplicate-btn-text);
  background: var(--cgw-duplicate-btn-bg);
}

.cgw-app button.cg-btn:not(.cg-btn--secondary),
.cgw-app a.cg-btn:not(.cg-btn--secondary),
.cgw-ui-scope button.cg-btn:not(.cg-btn--secondary),
.cgw-ui-scope a.cg-btn:not(.cg-btn--secondary) {
  background: var(--cgw-nav-active) !important;
  color: var(--cgw-nav-text) !important;
  -webkit-text-fill-color: var(--cgw-nav-text) !important;
  border: 1px solid var(--cgw-nav-active) !important;
  text-shadow: none !important;
  min-height: 38px !important;
  padding: 8px 14px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
}

.cgw-app .cgw-app__nav .cg-btn,
.cgw-ui-scope .cgw-app__nav .cg-btn {
  background: var(--cgw-nav-idle) !important;
  border-color: var(--cgw-nav-idle) !important;
  color: var(--cgw-nav-text) !important;
  -webkit-text-fill-color: var(--cgw-nav-text) !important;
}

.cgw-app .cgw-app__nav .cg-btn.is-active,
.cgw-ui-scope .cgw-app__nav .cg-btn.is-active {
  background: var(--cgw-nav-active) !important;
  border-color: var(--cgw-nav-active) !important;
}

.cgw-app button.cg-btn--secondary,
.cgw-app a.cg-btn--secondary,
.cgw-ui-scope button.cg-btn--secondary,
.cgw-ui-scope a.cg-btn--secondary,
.cgw-app button.cg-mini-btn:not(.cg-mini-btn--danger),
.cgw-app a.cg-mini-btn:not(.cg-mini-btn--danger),
.cgw-ui-scope button.cg-mini-btn:not(.cg-mini-btn--danger),
.cgw-ui-scope a.cg-mini-btn:not(.cg-mini-btn--danger) {
  background: var(--cgw-soft-btn-bg) !important;
  color: var(--cgw-soft-btn-text) !important;
  -webkit-text-fill-color: var(--cgw-soft-btn-text) !important;
  border: 1px solid var(--cgw-soft-btn-border) !important;
  box-shadow: none !important;
  text-shadow: none !important;
  min-height: 38px !important;
  padding: 8px 14px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
}

.cgw-app button.cg-btn--accent,
.cgw-app a.cg-btn--accent,
.cgw-ui-scope button.cg-btn--accent,
.cgw-ui-scope a.cg-btn--accent {
  background: var(--cgw-cloud-btn-bg) !important;
  color: var(--cgw-cloud-btn-text) !important;
  -webkit-text-fill-color: var(--cgw-cloud-btn-text) !important;
  border: 1px solid var(--cgw-cloud-btn-border) !important;
  box-shadow: 0 18px 30px rgba(255, 138, 36, 0.22) !important;
  text-shadow: none !important;
  min-height: 38px !important;
  padding: 8px 14px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
}

.cgw-app button.cg-mini-btn.cg-mini-btn--copy,
.cgw-app a.cg-mini-btn.cg-mini-btn--copy,
.cgw-ui-scope button.cg-mini-btn.cg-mini-btn--copy,
.cgw-ui-scope a.cg-mini-btn.cg-mini-btn--copy {
  background: var(--cgw-duplicate-btn-bg) !important;
  color: var(--cgw-duplicate-btn-text) !important;
  -webkit-text-fill-color: var(--cgw-duplicate-btn-text) !important;
  border: 1px solid var(--cgw-duplicate-btn-border) !important;
  box-shadow: none !important;
  text-shadow: none !important;
  min-height: 32px !important;
  padding: 6px 10px !important;
  border-radius: 10px !important;
  font-size: 12px !important;
  line-height: 1.1 !important;
}

.cgw-app button.cgw-action-save,
.cgw-app a.cgw-action-save,
.cgw-ui-scope button.cgw-action-save,
.cgw-ui-scope a.cgw-action-save {
  background: var(--cgw-save-btn-bg) !important;
  color: var(--cgw-save-btn-text) !important;
  -webkit-text-fill-color: var(--cgw-save-btn-text) !important;
  border: 1px solid var(--cgw-save-btn-border) !important;
}

.cgw-app button.cgw-action-new,
.cgw-app a.cgw-action-new,
.cgw-ui-scope button.cgw-action-new,
.cgw-ui-scope a.cgw-action-new {
  background: var(--cgw-new-btn-bg) !important;
  color: var(--cgw-new-btn-text) !important;
  -webkit-text-fill-color: var(--cgw-new-btn-text) !important;
  border: 1px solid var(--cgw-new-btn-border) !important;
}

.cgw-app button.cg-mini-btn.cg-mini-btn--danger,
.cgw-app a.cg-mini-btn.cg-mini-btn--danger,
.cgw-ui-scope button.cg-mini-btn.cg-mini-btn--danger,
.cgw-ui-scope a.cg-mini-btn.cg-mini-btn--danger {
  background: var(--cgw-delete-btn-bg) !important;
  color: var(--cgw-delete-btn-text) !important;
  -webkit-text-fill-color: var(--cgw-delete-btn-text) !important;
  border: 1px solid var(--cgw-delete-btn-border) !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

.cgw-app .cg-btn *,
.cgw-app .cg-mini-btn *,
.cgw-ui-scope .cg-btn *,
.cgw-ui-scope .cg-mini-btn * {
  color: inherit !important;
  -webkit-text-fill-color: inherit !important;
}

.cgw-panel {
  display: none;
}

.cgw-panel.is-active {
  display: block;
}

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

.cgw-item-card,
.cgw-recipe-card,
.cgw-cloud-item,
.cgw-warehouse-item,
.cgw-allergen,
.cgw-row-card,
.cgw-admin-section,
.cgw-nutri-panel,
.cgw-theme-field,
.cgw-calc-summary,
.cgw-theme-preview-card__box {
  border: 1px solid var(--cgw-border-color);
  border-radius: 18px;
  background: var(--cgw-card-bg);
}

.cgw-item-card,
.cgw-recipe-card,
.cgw-cloud-item,
.cgw-warehouse-item,
.cgw-nutri-panel,
.cgw-calc-summary {
  padding: 16px;
}

.cg-input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--cgw-border-color);
  background: #fff;
  color: var(--cgw-text-color);
  font: inherit;
}

.cg-input:focus {
  outline: 0;
  border-color: var(--cgw-nav-idle);
  box-shadow: 0 0 0 4px rgba(27, 183, 184, 0.12);
}

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

.cgw-field-grid--recipe-meta {
  margin-top: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.cgw-field > span {
  color: var(--cgw-title-color);
  font-size: 13px;
  font-weight: 700;
}

.cgw-field__title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cgw-field__tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(27, 183, 184, 0.24);
  background: #eef9fb;
  color: var(--cgw-title-color);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  cursor: help;
  flex-shrink: 0;
}

.cgw-field__tooltip-bubble {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  display: none;
  width: min(320px, 75vw);
  padding: 10px 12px;
  border: 1px solid var(--cgw-border-color);
  border-radius: 12px;
  background: #ffffff;
  color: var(--cgw-text-color);
  box-shadow: 0 14px 30px rgba(17, 43, 74, 0.14);
  line-height: 1.5;
  white-space: normal;
  z-index: 40;
}

.cgw-field__tooltip:hover .cgw-field__tooltip-bubble,
.cgw-field__tooltip:focus .cgw-field__tooltip-bubble,
.cgw-field__tooltip:focus-within .cgw-field__tooltip-bubble {
  display: block;
}

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

.cgw-field__help {
  color: var(--cgw-muted);
  line-height: 1.5;
}

.cgw-field--suggest {
  position: relative;
}

.cgw-ingredient-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--cgw-border-color);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(17, 43, 74, 0.14);
  max-height: 240px;
  overflow: auto;
}

.cgw-ingredient-suggest[hidden] {
  display: none;
}

.cgw-ingredient-suggest__item {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(17, 43, 74, 0.10);
  border-radius: 12px;
  background: #f7fbff;
  color: var(--cgw-text-color);
  text-align: left;
  cursor: pointer;
}

.cgw-ingredient-suggest__item:hover,
.cgw-ingredient-suggest__item:focus {
  background: #eef7ff;
  border-color: rgba(47, 42, 112, 0.20);
}

.cgw-ingredient-suggest__item strong {
  color: var(--cgw-title-color);
}

.cgw-ingredient-suggest__item small {
  color: var(--cgw-muted);
}

.cgw-nutri-panel__title,
.cgw-theme-preview-card__box strong {
  display: block;
  margin-bottom: 14px;
  color: var(--cgw-title-color);
  font-weight: 700;
}

.cgw-theme-field {
  padding: 12px;
}

.cgw-theme-field strong {
  color: var(--cgw-title-color);
}

.cgw-theme-field__controls {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 10px;
}

.cgw-theme-field__controls input[type="color"] {
  width: 52px;
  height: 44px;
  border: 1px solid var(--cgw-border-color);
  border-radius: 12px;
  background: #fff;
  padding: 4px;
}

.cgw-theme-preview-card {
  padding: 14px;
  border-radius: 18px;
  background: var(--cgw-surface-bg);
  border: 1px dashed var(--cgw-border-color);
}

.cgw-lab-block {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.cgw-lab-block__head h4 {
  margin: 0;
  color: var(--cgw-title-color);
}

.cgw-lab-block__head p {
  margin: 8px 0 0;
  color: var(--cgw-muted);
}

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

.cgw-lab-dictionary-card {
  border: 1px solid var(--cgw-border-color);
  border-radius: 16px;
  background: var(--cgw-card-bg);
  padding: 14px 16px;
}

.cgw-lab-dictionary-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--cgw-title-color);
}

.cgw-lab-dictionary-card small {
  display: block;
  color: var(--cgw-muted);
  line-height: 1.6;
}

.cgw-lab-custom {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px dashed var(--cgw-border-color);
  border-radius: 16px;
  background: #fcfeff;
}

.cgw-lab-custom__head strong {
  display: block;
  color: var(--cgw-title-color);
}

.cgw-lab-custom__head small {
  display: block;
  margin-top: 6px;
  color: var(--cgw-muted);
  line-height: 1.5;
}

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

.cgw-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cgw-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--cgw-border-color);
  background: #fff;
}

.cgw-allergen--custom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.cgw-allergen__selector {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.cgw-nutri-quick {
  display: grid;
  gap: 10px;
  margin: 18px 0 14px;
}

.cgw-nutri-quick strong {
  color: var(--cgw-title-color);
}

.cgw-nutri-quick__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cgw-nutri-quick__note {
  margin: 0;
  color: var(--cgw-muted);
}

.cgw-additive-panel {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid #d7e6f7;
  border-radius: 16px;
  background: linear-gradient(180deg, #eef6ff 0%, #e5f1ff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

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

.cgw-additive-panel__mode-note {
  padding: 12px 14px;
  border-left: 4px solid #1d6fb8;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  color: #1f2937;
  line-height: 1.5;
}

.cgw-additive-panel__mode-help,
.cgw-additive-panel__note {
  margin: 0;
  color: var(--cgw-muted);
}

.cgw-additive-rows {
  display: grid;
  gap: 12px;
}

.cgw-additive-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 12px;
  border: 1px solid #d9e2ee;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.cgw-additive-row__badge {
  grid-column: 1 / -1;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #0b4f94;
}

.cgw-additive-row__custom {
  margin-top: 8px;
}

.cgw-additive-row__remove {
  margin-bottom: 2px;
}

.cgw-additive-row__actions {
  display: grid;
  gap: 8px;
  align-self: end;
}

.cgw-additive-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cgw-additive-preview {
  padding: 10px 12px;
  border: 1px dashed #bfd6ee;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
}

.cgw-additive-preview strong {
  display: block;
  margin-bottom: 4px;
  color: #0b4f94;
}

.cgw-additive-preview__text {
  color: #334155;
}

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

.cgw-additive-guidance__box {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(17, 43, 74, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.84);
}

.cgw-additive-guidance__box strong {
  color: var(--cgw-title-color);
}

.cgw-additive-guidance__hint {
  color: var(--cgw-muted);
  line-height: 1.5;
}

.cgw-additive-suggestion-list {
  display: grid;
  gap: 10px;
}

.cgw-additive-suggestion {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid rgba(29, 111, 184, 0.14);
  border-radius: 12px;
  background: #f7fbff;
}

.cgw-additive-suggestion--empty {
  grid-template-columns: 1fr;
  color: var(--cgw-muted);
}

.cgw-additive-suggestion__copy {
  display: grid;
  gap: 6px;
}

.cgw-additive-suggestion__copy strong {
  color: var(--cgw-title-color);
}

.cgw-additive-suggestion__warning {
  margin: 0;
  color: #0b4f94;
  font-weight: 700;
}

.cgw-additive-suggestion__note {
  color: var(--cgw-muted);
  line-height: 1.5;
}

.cgw-theme-preview-card__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.cgw-theme-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--cgw-nav-idle);
  color: var(--cgw-nav-text);
  font-size: 12px;
  font-weight: 700;
}

.cgw-theme-pill--active {
  background: var(--cgw-nav-active);
}

.cgw-theme-pill--secondary {
  background: var(--cgw-soft-btn-bg);
  color: var(--cgw-soft-btn-text);
  border: 1px solid var(--cgw-soft-btn-border);
}

.cgw-theme-pill--accent {
  background: var(--cgw-cloud-btn-bg);
  color: var(--cgw-cloud-btn-text);
  border: 1px solid var(--cgw-cloud-btn-border);
}

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

.cgw-allergen {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
}

.cgw-allergen input {
  margin-top: 4px;
}

.cgw-allergen strong,
.cgw-cloud-item strong {
  display: block;
  color: var(--cgw-title-color);
}

.cgw-allergen small,
.cgw-cloud-item p,
.cgw-cloud-item small,
.cgw-admin-section__hint,
.cgw-calc-summary__warnings span {
  display: block;
  color: var(--cgw-muted);
  line-height: 1.5;
  margin-top: 6px;
}

.cgw-cloud-search {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  width: min(60%, 720px);
  max-width: 100%;
}

.cgw-cloud-search .cg-input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  display: block;
  margin: 0;
  box-sizing: border-box;
}

.cgw-cloud-search .cg-btn {
  width: auto;
  max-width: 100%;
  align-self: flex-start;
}

.cgw-cloud-search .cg-input:focus {
  box-shadow: none;
  border-color: var(--cgw-nav-idle);
}

.cgw-ingredients-search__summary {
  margin-top: 10px;
  color: var(--cgw-muted);
  line-height: 1.5;
}

.cgw-cloud-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--cgw-border-color);
  background: linear-gradient(180deg, #ffffff 0%, var(--cgw-surface-bg) 100%);
  box-shadow: 0 12px 22px rgba(34, 49, 66, 0.05);
}

.cgw-cloud-summary__copy strong {
  display: block;
  color: var(--cgw-title-color);
}

.cgw-cloud-summary__copy p,
.cgw-cloud-summary__note {
  margin: 6px 0 0;
  color: var(--cgw-muted);
  line-height: 1.5;
}

.cgw-cloud-summary__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.cgw-cloud-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cgw-cloud-item__meta {
  display: grid;
  gap: 12px;
  justify-items: end;
}

.cgw-cloud-item__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.cgw-cloud-item__badge.is-new {
  background: rgba(255, 138, 36, 0.14);
  color: #b65a00;
}

.cgw-cloud-item__badge.is-updated {
  background: #fff8eb;
  color: #9a6700;
}

.cgw-cloud-item__badge.is-same {
  background: #eefcf3;
  color: #1f7a45;
}

.cgw-nav-warehouse:not(.is-active),
.cg-btn--warehouse {
  background: var(--cgw-warehouse-btn-bg);
  border-color: var(--cgw-warehouse-btn-border);
  color: var(--cgw-warehouse-btn-text);
}

.cg-card--warehouse {
  overflow: hidden;
}

.cgw-warehouse-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.cgw-warehouse-stat {
  padding: 15px;
  border-radius: 18px;
  border: 1px solid rgba(15, 159, 143, 0.18);
  background: linear-gradient(180deg, #f3fffc 0%, #ffffff 100%);
}

.cgw-warehouse-stat strong {
  display: block;
  color: #0f766e;
  font-size: 26px;
  line-height: 1;
}

.cgw-warehouse-stat span {
  display: block;
  margin-top: 8px;
  color: var(--cgw-muted);
  font-size: 13px;
  line-height: 1.4;
}

.cgw-warehouse-stat.is-low {
  border-color: rgba(207, 59, 59, 0.24);
  background: #fff6f6;
}

.cgw-warehouse-stat.is-low strong {
  color: #ba1f1f;
}

.cgw-warehouse-stat.is-warning {
  border-color: rgba(217, 119, 6, 0.26);
  background: #fff8eb;
}

.cgw-warehouse-stat.is-warning strong {
  color: #a65f00;
}

.cgw-warehouse-sale,
.cgw-warehouse-search {
  display: grid;
  gap: 12px;
  margin: 16px 0;
  padding: 16px;
  border: 1px solid var(--cgw-border-color);
  border-radius: 18px;
  background: rgba(247, 251, 255, 0.72);
}

.cgw-warehouse-sale__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(140px, 0.6fr) auto;
  gap: 12px;
  align-items: end;
}

.cgw-warehouse-sale__preview {
  padding: 14px;
  border-radius: 16px;
  border: 1px dashed var(--cgw-border-color);
  background: #ffffff;
  color: var(--cgw-muted);
}

.cgw-warehouse-sale__preview strong {
  display: block;
  margin-bottom: 8px;
  color: var(--cgw-title-color);
}

.cgw-warehouse-sale__preview ul {
  margin: 0;
  padding-left: 18px;
}

.cgw-warehouse-search__row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.cgw-warehouse-search__row .cg-input {
  flex: 1 1 auto;
  min-width: 0;
}

.cgw-warehouse-item {
  display: grid;
  gap: 14px;
  position: relative;
  border-left: 8px solid #0f9f8f;
}

.cgw-warehouse-item.is-low {
  border-left-color: #cf3b3b;
}

.cgw-warehouse-item.is-empty {
  border-left-color: #d7a21d;
}

.cgw-warehouse-item__head,
.cgw-warehouse-item__totals {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.cgw-warehouse-titleblock {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.cgw-stock-led {
  width: 15px;
  height: 15px;
  margin-top: 5px;
  border-radius: 999px;
  flex: 0 0 15px;
  border: 2px solid rgba(255, 255, 255, 0.95);
  background: #94a3b8;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.18), 0 0 14px rgba(148, 163, 184, 0.35);
}

.cgw-stock-led--green {
  background: #18b76b;
  box-shadow: 0 0 0 3px rgba(24, 183, 107, 0.18), 0 0 16px rgba(24, 183, 107, 0.55);
}

.cgw-stock-led--yellow {
  background: #f5b51b;
  box-shadow: 0 0 0 3px rgba(245, 181, 27, 0.22), 0 0 17px rgba(245, 181, 27, 0.65);
}

.cgw-stock-led--red {
  background: #ef3131;
  animation: cgwStockLedPulse 1.15s ease-in-out infinite;
  box-shadow: 0 0 0 4px rgba(239, 49, 49, 0.22), 0 0 22px rgba(239, 49, 49, 0.78);
}

.cgw-stock-led--off {
  background: #cbd5e1;
}

@keyframes cgwStockLedPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 4px rgba(239, 49, 49, 0.18), 0 0 18px rgba(239, 49, 49, 0.62);
  }
  50% {
    transform: scale(1.18);
    box-shadow: 0 0 0 9px rgba(239, 49, 49, 0.08), 0 0 32px rgba(239, 49, 49, 0.95);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cgw-stock-led--red {
    animation: none;
  }
}

.cgw-warehouse-item__head h4 {
  margin: 0;
  color: var(--cgw-title-color);
  font-size: 22px;
}

.cgw-warehouse-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.cgw-warehouse-item__head p {
  margin: 5px 0 0;
  color: var(--cgw-muted);
}

.cgw-warehouse-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #eefcf3;
  color: #1f7a45;
  font-size: 12px;
  font-weight: 800;
}

.cgw-warehouse-item.is-low .cgw-warehouse-badge {
  background: #fff0f0;
  color: #ba1f1f;
}

.cgw-warehouse-item.is-empty .cgw-warehouse-badge {
  background: #fff8eb;
  color: #9a6700;
}

.cgw-warehouse-badge--expiry.is-ok {
  background: #eefcf3;
  color: #1f7a45;
}

.cgw-warehouse-badge--expiry.is-warning {
  background: #fff8eb;
  color: #9a6700;
}

.cgw-warehouse-badge--expiry.is-low {
  background: #fff0f0;
  color: #ba1f1f;
}

.cgw-warehouse-badge--expiry.is-empty {
  background: #eef6fb;
  color: var(--cgw-muted);
}

.cgw-warehouse-progress {
  position: relative;
  overflow: hidden;
  min-height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(15, 159, 143, 0.18);
  background: #edf8f6;
}

.cgw-warehouse-progress__bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  max-width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e 0%, #0f9f8f 100%);
}

.cgw-warehouse-item.is-low .cgw-warehouse-progress__bar {
  background: linear-gradient(90deg, #ef4444 0%, #f97316 100%);
}

.cgw-warehouse-progress strong {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  color: var(--cgw-title-color);
}

.cgw-warehouse-item__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.cgw-warehouse-storage {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(27, 183, 184, 0.18);
  background: #f7fffd;
  color: var(--cgw-muted);
  line-height: 1.5;
}

.cgw-warehouse-storage strong {
  color: var(--cgw-title-color);
}

.cgw-warehouse-item__totals {
  padding: 12px;
  border-radius: 14px;
  background: rgba(27, 183, 184, 0.08);
  color: var(--cgw-muted);
}

.cgw-warehouse-item__totals strong {
  color: var(--cgw-title-color);
}

.cgw-warehouse-item__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.cgw-warehouse-item__actions .cg-mini-btn {
  flex: 1 1 220px;
}

.cgw-warehouse-save {
  flex: 0 1 260px;
  min-height: 38px;
  padding: 10px 16px;
}

.cgw-empty {
  padding: 18px;
  border-radius: 16px;
  border: 1px dashed var(--cgw-border-color);
  background: #fafefe;
}

.cgw-empty p {
  margin: 8px 0 14px;
}

.cgw-empty--action {
  display: grid;
  gap: 10px;
  justify-items: start;
}

.cgw-lab-preview,
.cgw-calc-summary {
  margin-top: 18px;
  background: var(--cgw-surface-bg);
}

.cgw-calc-summary {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid rgba(27, 183, 184, 0.12);
  border-radius: 18px;
}

.cgw-calc-summary__line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid rgba(12, 56, 96, 0.08);
  font-size: 14px;
  line-height: 1.35;
  background: #f8fcff;
}

.cgw-calc-summary__label {
  color: #335579;
  font-weight: 700;
}

.cgw-calc-summary__value {
  margin-left: auto;
  font-weight: 800;
  letter-spacing: 0.1px;
}

.cgw-calc-summary__line.is-total {
  border-left: 5px solid #1f5f9c;
  background: #eef6ff;
}

.cgw-calc-summary__line.is-total .cgw-calc-summary__value {
  color: #0f4676;
}

.cgw-calc-summary__line.is-per100 {
  border-left: 5px solid #2d7ca7;
  background: #eefbff;
}

.cgw-calc-summary__line.is-per100 .cgw-calc-summary__value {
  color: #16617f;
}

.cgw-calc-summary__line.is-saleunit {
  border-left: 5px solid #3b6bb0;
  background: #f2f6ff;
}

.cgw-calc-summary__line.is-saleunit .cgw-calc-summary__value {
  color: #264a89;
}

.cgw-calc-summary__line.is-price {
  border-left: 5px solid #007bb8;
  background: #ebf8ff;
}

.cgw-calc-summary__line.is-price .cgw-calc-summary__value {
  color: #006ea3;
}

.cgw-calc-summary__line.is-ratio {
  border-left: 5px solid #0f9ea6;
  background: #eafdfd;
}

.cgw-calc-summary__line.is-ratio .cgw-calc-summary__value {
  color: #08787f;
}

.cgw-calc-summary__line.is-profit {
  border-left: 5px solid #24974a;
  background: #edfdf2;
}

.cgw-calc-summary__line.is-profit .cgw-calc-summary__value {
  color: #16773a;
}

.cgw-calc-summary__line.is-profit-eur {
  border-left: 5px solid #0d8a57;
  background: #e8fbf2;
}

.cgw-calc-summary__line.is-profit-eur .cgw-calc-summary__value {
  color: #0a6b43;
}

.cgw-row-card {
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.cgw-row-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 120px;
  gap: 12px;
}

.cgw-row-card__remove {
  min-width: 44px;
}

.cgw-recipes-overview {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--cgw-border-color);
  background: var(--cgw-surface-bg);
}

.cgw-recipes-overview__head strong {
  display: block;
  color: var(--cgw-title-color);
}

.cgw-recipes-overview__head small {
  display: block;
  margin-top: 6px;
  color: var(--cgw-muted);
  line-height: 1.5;
}

.cgw-recipes-overview__list {
  display: grid;
  gap: 10px;
}

.cgw-recipe-overview__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: stretch;
  width: 100%;
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid var(--cgw-border-color);
  background: linear-gradient(180deg, #ffffff 0%, #f9fcff 100%);
  box-shadow: 0 14px 28px rgba(34, 49, 66, 0.06);
  color: var(--cgw-text-color);
  text-align: left;
}

.cgw-recipe-overview__copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.cgw-recipe-overview__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--cgw-muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cgw-recipe-overview__copy strong {
  display: block;
  color: var(--cgw-title-color);
  font-size: 24px;
  line-height: 1.2;
}

.cgw-recipe-overview__copy small {
  display: block;
  color: var(--cgw-muted);
  line-height: 1.45;
  font-size: 14px;
}

.cgw-recipe-overview__dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #c53030;
  box-shadow: 0 0 0 5px rgba(197, 48, 48, 0.08);
}

.cgw-recipe-overview__state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.cgw-recipe-overview__meta {
  display: grid;
  gap: 12px;
  justify-items: end;
  align-content: space-between;
}

.cgw-recipe-overview__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.cgw-recipe-overview__state.is-complete,
.cgw-recipe-overview__dot.is-complete {
  background: #eefcf3;
  color: #1f7a45;
}

.cgw-recipe-overview__dot.is-complete {
  box-shadow: 0 0 0 5px rgba(31, 122, 69, 0.1);
}

.cgw-recipe-overview__state.is-warning,
.cgw-recipe-overview__dot.is-warning {
  background: #fff8eb;
  color: #9a6700;
}

.cgw-recipe-overview__dot.is-warning {
  box-shadow: 0 0 0 5px rgba(154, 103, 0, 0.1);
}

.cgw-recipe-overview__state.is-incomplete,
.cgw-recipe-overview__dot.is-incomplete {
  background: #fff5f5;
  color: #c53030;
}

.cgw-recipe-overview__dot.is-incomplete {
  box-shadow: 0 0 0 5px rgba(197, 48, 48, 0.08);
}

.cgw-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cgw-pagination__info {
  color: var(--cgw-muted);
  font-weight: 600;
}

.cgw-pagination__size {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--cgw-muted);
  font-weight: 600;
}

.cgw-pagination__size .cg-input {
  width: 110px;
  min-height: 40px;
}

.cgw-recipe-builder__head small {
  display: block;
  margin-top: 6px;
  color: var(--cgw-muted);
}

.cgw-calc-summary__warnings {
  margin-top: 4px;
}

.cgw-section-grid {
  grid-template-columns: 1fr;
  margin-top: 16px;
}

.cgw-recipe-bottom-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.cgw-ingredient-bottom-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.cgw-admin-section {
  --cgw-section-accent: #2d7ca7;
  border-left: 6px solid var(--cgw-section-accent);
  padding: 16px 16px 16px 18px;
}

.cgw-admin-section--ingredients {
  --cgw-section-accent: #1f5f9c;
}

.cgw-admin-section--allergens {
  --cgw-section-accent: #c93c3c;
}

.cgw-admin-section--warning {
  --cgw-section-accent: #c0800a;
}

.cgw-admin-section--nutrition {
  --cgw-section-accent: #0f8da2;
}

.cgw-admin-section--notes {
  --cgw-section-accent: #24974a;
}

.cgw-admin-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cgw-admin-section__title {
  margin: 0;
  color: var(--cgw-title-color);
}

.cgw-admin-section__state {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.cgw-admin-section__state.is-required {
  color: #c53030;
  background: #fff5f5;
}

.cgw-admin-section__state.is-complete {
  color: #1f7a45;
  background: #eefcf3;
}

.cgw-admin-section__state.is-optional {
  color: #9a6700;
  background: #fff8eb;
}

.cgw-admin-section__state.is-not-needed {
  color: #8d2042;
  background: #fff2f6;
}

.cgw-admin-section textarea.cg-input[readonly] {
  background: #ffffff;
}

.cgw-savebar {
  margin-top: 18px;
}

.cgw-savebar__status[data-state="success"] {
  color: #136d3d;
  border-color: rgba(19, 109, 61, 0.18);
  background: #f2fcf6;
}

.cgw-savebar__status[data-state="warn"] {
  color: #9a6700;
  border-color: rgba(154, 103, 0, 0.18);
  background: #fff8eb;
}

.cgw-savebar__status[data-state="error"] {
  color: var(--cgw-danger);
  border-color: rgba(207, 59, 59, 0.18);
  background: #fff6f6;
}

.cgw-confirm-delete-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(12, 22, 40, 0.55);
}

.cgw-confirm-delete {
  width: min(440px, 100%);
  border-radius: 18px;
  border: 1px solid #d7e7ef;
  background: #ffffff;
  box-shadow: 0 26px 55px rgba(12, 22, 40, 0.30);
  padding: 18px;
}

.cgw-confirm-delete h4 {
  margin: 0;
  color: #2f2a70;
  font-size: 22px;
  line-height: 1.2;
}

.cgw-confirm-delete p {
  margin: 10px 0 0;
  color: #4a5a6c;
}

.cgw-confirm-delete__actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.cgw-confirm-delete__btn {
  min-height: 40px;
  padding: 9px 16px;
  border-radius: 11px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.2px;
  cursor: pointer;
}

.cgw-confirm-delete__btn.is-no {
  background: #ffffff;
  color: #2f2a70;
  border-color: #d7e7ef;
}

.cgw-confirm-delete__btn.is-yes {
  background: #cf3b3b;
  color: #ffffff;
  border-color: #cf3b3b;
}

.cgw-label-module {
  margin-top: 18px;
  display: grid;
  gap: 16px;
}

.cgw-label-module__grid,
.cgw-label-module__settings,
.cgw-label-module__preview {
  display: grid;
  gap: 14px;
}

.cgw-label-module__grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.9fr);
  align-items: start;
}

.cgw-label-module__settings {
  align-content: start;
}

.cgw-label-module__preview {
  position: sticky;
  top: 18px;
  align-self: start;
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding-right: 4px;
}

.cgw-label-card {
  padding: 16px;
  border: 1px solid var(--cgw-border-color);
  border-radius: 18px;
  background: var(--cgw-card-bg);
}

.cgw-label-card h5 {
  margin: 0;
  color: var(--cgw-title-color);
}

.cgw-label-card p,
.cgw-label-card__note {
  margin: 8px 0 0;
  color: var(--cgw-muted);
  line-height: 1.6;
}

.cgw-label-visibility-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.cgw-label-visibility-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--cgw-border-color);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, var(--cgw-surface-bg) 100%);
}

.cgw-label-visibility-row__copy {
  display: grid;
  gap: 4px;
}

.cgw-label-visibility-row__copy strong {
  color: var(--cgw-title-color);
}

.cgw-label-visibility-row__copy span {
  color: var(--cgw-muted);
  line-height: 1.45;
}

.cgw-label-visibility-row .cg-mini-btn {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 11px;
  line-height: 1.15;
  border-radius: 10px;
  flex: 0 0 auto;
}

.cgw-app input[data-cgw-decimal-input="1"].cg-input,
.cgw-app input[type="number"].cg-input {
  appearance: textfield;
  -moz-appearance: textfield;
}

.cgw-app input[data-cgw-decimal-input="1"].cg-input::-webkit-outer-spin-button,
.cgw-app input[data-cgw-decimal-input="1"].cg-input::-webkit-inner-spin-button,
.cgw-app input[type="number"].cg-input::-webkit-outer-spin-button,
.cgw-app input[type="number"].cg-input::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}

.cgw-field-grid--label {
  margin-top: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cgw-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

.cgw-toggle span {
  color: var(--cgw-text-color);
  font-weight: 600;
}

.cgw-label-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.cgw-label-assets {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.cgw-label-assets__empty {
  padding: 14px 16px;
  border: 1px dashed var(--cgw-border-color);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, var(--cgw-surface-bg) 100%);
  color: var(--cgw-muted);
  line-height: 1.6;
}

.cgw-label-asset-row {
  padding: 14px;
  border: 1px solid var(--cgw-border-color);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, var(--cgw-surface-bg) 100%);
}

.cgw-label-asset-row__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.cgw-label-asset-row__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.cgw-label-asset-row__copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.cgw-label-asset-row__copy strong {
  color: var(--cgw-title-color);
}

.cgw-label-asset-row__copy span {
  color: var(--cgw-muted);
  line-height: 1.45;
}

.cgw-label-asset-row__thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  padding: 6px;
  border: 1px solid var(--cgw-border-color);
  border-radius: 14px;
  background: #fff;
  box-sizing: border-box;
  overflow: hidden;
  flex: 0 0 auto;
}

.cgw-label-asset-row__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.cgw-label-asset-row__thumb--social {
  width: auto;
  min-width: 120px;
  max-width: 220px;
  justify-content: flex-start;
}

.cgw-label-asset-row__controls {
  margin-top: 10px;
}

.cgw-label-reset-btn {
  margin-top: 8px;
}

.cgw-label-guide-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.cgw-label-guide {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid transparent;
}

.cgw-label-guide strong {
  color: var(--cgw-title-color);
}

.cgw-label-guide span {
  color: #5f6f81;
  line-height: 1.5;
}

.cgw-label-guide.is-ok {
  background: #eef9f0;
  border-color: #b9e4c0;
}

.cgw-label-guide.is-warn {
  background: #fff7e8;
  border-color: #f1c87b;
}

.cgw-label-logo-picker {
  display: grid;
  gap: 12px;
}

.cgw-label-logo-picker__preview {
  min-height: 110px;
  border: 1px dashed var(--cgw-border-color);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(247, 251, 255, 0.9) 0%, rgba(234, 245, 251, 0.9) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  color: var(--cgw-muted);
  text-align: center;
}

.cgw-label-logo-picker__preview img {
  max-width: 100%;
  max-height: 110px;
  object-fit: contain;
  display: block;
}

.cgw-label-logo-picker__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cgw-label-logo-picker__help {
  display: block;
  color: var(--cgw-muted);
}

.cgw-label-logo-picker__help[data-state="error"] {
  color: #b44c00;
}

.cgw-label-logo-picker__help[data-state="loading"] {
  color: #0e6aa8;
}

.cgw-label-preview-host {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 420px;
  overflow: auto;
  padding: 18px;
  margin-top: 14px;
  border: 1px dashed var(--cgw-border-color);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(247, 251, 255, 0.92) 0%, rgba(234, 245, 251, 0.96) 100%);
}

.cgw-label-page {
  position: relative;
  box-sizing: border-box;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid #c9dbe6;
  border-radius: var(--cgw-label-corner-radius, 18px);
  background: #ffffff;
  color: #1d2835;
  box-shadow: 0 16px 32px rgba(17, 43, 74, 0.12);
  font-family: var(--cgw-label-body-font);
  font-size: var(--cgw-label-body-size);
  line-height: 1.35;
}

.cgw-label-page.has-cut-margin::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px dashed rgba(47, 42, 112, 0.28);
  border-radius: var(--cgw-label-corner-radius, 14px);
  pointer-events: none;
}

.cgw-label__inner {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
}

.cgw-label__top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.cgw-label-page--logo-top .cgw-label__top {
  grid-template-columns: minmax(0, 1fr) auto;
}

.cgw-label-page--logo-top .cgw-label__logo {
  grid-column: 1 / -1;
  justify-content: flex-start;
}

.cgw-label-page--logo-right .cgw-label__head {
  order: 1;
}

.cgw-label-page--logo-right .cgw-label__logo {
  order: 2;
}

.cgw-label__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.cgw-label__logo img,
.cgw-label__qr img {
  display: block;
  max-width: 100%;
  height: auto;
}

.cgw-label__head {
  min-width: 0;
}

.cgw-label__name {
  color: #19345c;
  font-family: var(--cgw-label-title-font);
  font-size: var(--cgw-label-title-size);
  font-weight: 800;
  line-height: 1.1;
}

.cgw-label__sub {
  margin-top: 4px;
  color: #5a6774;
  font-size: calc(var(--cgw-label-body-size) - 0.5px);
}

.cgw-label__section {
  border: 1px solid #e1edf3;
  border-radius: var(--cgw-label-corner-radius, 12px);
  background: #fff;
  padding: 8px 10px;
}

.cgw-label__section--embedded {
  border: 0;
  background: transparent;
  padding: 0;
}

.cgw-label__section-title {
  margin-bottom: 6px;
  color: #19345c;
  font-weight: 800;
  font-size: calc(var(--cgw-label-body-size) + 0.2px);
}

.cgw-label__table {
  display: grid;
  gap: 3px;
}

.cgw-label__row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.cgw-label__k {
  flex: 1 1 auto;
}

.cgw-label__v {
  flex: 0 0 auto;
  text-align: right;
  font-weight: 700;
}

.cgw-label__nutrition-list {
  display: block;
  line-height: 1.32;
}

.cgw-label__nutrition-list-line {
  display: inline;
}

.cgw-label__nutrition-list-line + .cgw-label__nutrition-list-line::before {
  content: " - ";
}

.cgw-label__mini {
  margin-top: 4px;
}

.cgw-label__mini strong {
  color: #19345c;
}

.cgw-label__hit {
  font-weight: 800;
}

.cgw-label__qr {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18mm;
  min-width: 18mm;
}

.cgw-label-page--pro_gelato .cgw-label__name {
  font-size: calc(var(--cgw-label-title-size) + 4px);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.cgw-label__custom-canvas {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  min-height: 100%;
  border: 1px solid rgba(47, 42, 112, 0.10);
  border-radius: var(--cgw-label-corner-radius, 16px);
  overflow: hidden;
  background:
    linear-gradient(to right, rgba(27, 183, 184, 0.10) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(27, 183, 184, 0.10) 1px, transparent 1px),
    linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  background-size: 12.5% 12.5%, 12.5% 12.5%, 100% 100%;
}

.cgw-label__custom-canvas::before,
.cgw-label__custom-canvas::after {
  content: "";
  position: absolute;
  pointer-events: none;
  background: rgba(47, 42, 112, 0.12);
}

.cgw-label__custom-canvas::before {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
}

.cgw-label__custom-canvas::after {
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
}

.cgw-label-page.is-no-cut-margin::after {
  display: none;
}

.cgw-label__block {
  position: absolute;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid var(--cgw-border-color);
  border-radius: var(--cgw-label-corner-radius, 14px);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 22px rgba(17, 43, 74, 0.08);
  overflow: visible;
}

.cgw-label__block.is-draggable {
  cursor: move;
  touch-action: none;
  user-select: none;
}

.cgw-label__block.is-dragging {
  cursor: grabbing;
  box-shadow: 0 18px 32px rgba(17, 43, 74, 0.16);
}

.cgw-label__block-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  margin-bottom: 8px;
  border-radius: 999px;
  background: rgba(27, 183, 184, 0.10);
  color: #0e8d8f;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.cgw-label__block img {
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}

.cgw-label__block--logo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.cgw-label__block--logo .cgw-label__logo,
.cgw-label__block--logo .cgw-label__logo--custom {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.cgw-label__block--logo .cgw-label__logo img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
}

.cgw-label__block--graphic {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.cgw-label__block--graphic img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
}

.cgw-label__block--social {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 6px 8px;
}

.cgw-label__block--text {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 6px 8px;
  overflow: hidden;
}

.cgw-label__social {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.cgw-label__social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9em;
  height: 1.9em;
  min-width: 1.9em;
  border-radius: 999px;
  background: transparent;
  color: var(--cgw-social-fg, #ffffff);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  flex: 0 0 auto;
  overflow: hidden;
}

.cgw-label__social-icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.cgw-label__social-text {
  min-width: 0;
  color: #19345c;
  font-weight: 700;
  line-height: 1.25;
  word-break: break-word;
}

.cgw-label__free-text {
  width: 100%;
  color: #19345c;
  font-size: var(--cgw-label-free-text-size, 12px);
  font-weight: 600;
  line-height: 1.25;
  word-break: break-word;
  white-space: normal;
}

.cgw-label__free-text-line + .cgw-label__free-text-line {
  margin-top: 0.2em;
}

.cgw-label-asset-row__thumb--text {
  align-items: flex-start;
  justify-content: flex-start;
  padding: 10px;
  overflow: hidden;
}

.cgw-label-preview-wrap.is-print .cgw-label-page--custom {
  background: none;
}

.cgw-label-preview-wrap.is-print,
.cgw-label-preview-wrap.is-print .cgw-label-preview-host,
.cgw-label-preview-wrap.is-print .cgw-label-sheet,
.cgw-label-preview-wrap.is-print .cgw-label-page {
  background: #ffffff !important;
  box-shadow: none;
}

.cgw-label-preview-wrap.is-print .cgw-label-page--custom .cgw-label__custom-canvas {
  background: #ffffff;
  border: 0;
}

.cgw-label-preview-wrap.is-print .cgw-label-page--custom .cgw-label__custom-canvas::before,
.cgw-label-preview-wrap.is-print .cgw-label-page--custom .cgw-label__custom-canvas::after {
  display: none;
}

.cgw-label-preview-wrap.is-print .cgw-label-page--custom .cgw-label__block {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.cgw-label-preview-wrap.is-print .cgw-label-page.is-no-cut-margin::after {
  display: none !important;
}

.cgw-label-preview-wrap:not(.is-print) .cgw-label-page--custom .cgw-label__block.is-draggable {
  cursor: move;
}

.cgw-guard {
  max-width: 760px;
  margin: 32px auto;
  text-align: center;
}

.cgw-guard__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 20px;
}

@media (max-width: 1250px) {
  .cgw-workspace {
    grid-template-columns: 1fr;
  }

  .cgw-field-grid--recipe-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cgw-label-module__grid {
    grid-template-columns: 1fr;
  }

  .cgw-label-module__preview {
    position: static;
    top: auto;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }
}

@media (max-width: 980px) {
  .cgw-allergen-grid,
  .cgw-field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cgw-additive-guidance,
  .cgw-additive-row {
    grid-template-columns: 1fr;
  }

  .cgw-additive-row__actions {
    width: 100%;
  }

  .cgw-lab-custom__row,
  .cgw-recipe-overview__item {
    grid-template-columns: 1fr;
  }

  .cgw-recipe-overview__meta,
  .cgw-recipe-overview__actions {
    justify-items: stretch;
    justify-content: flex-start;
  }

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

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

  .cgw-row-card__remove {
    justify-self: start;
  }

  .cgw-app__hero-layout,
  .cg-card__head,
  .cgw-item-card__head,
  .cgw-recipe-builder__head,
  .cgw-savebar,
  .cgw-sidebar__brand,
  .cgw-cloud-item {
    flex-direction: column;
  }

  .cgw-app__hero-layout {
    align-items: stretch;
  }

  .cgw-app__hero-brand,
  .cgw-app__hero-meta {
    width: 100%;
    flex: none;
  }

  .cgw-app__hero-meta {
    justify-content: flex-start;
  }
}

@media (max-width: 782px) {
  .cgw-shell {
    padding: 16px;
  }

  .cgw-app {
    margin: 16px auto;
  }

  .cg-card,
  .cgw-panel,
  .cgw-savebar,
  .cgw-guard,
  .cgw-app__hero {
    border-radius: 18px;
    padding: 16px;
  }

  .cgw-cloud-search,
  .cgw-warehouse-summary,
  .cgw-warehouse-sale__grid,
  .cgw-warehouse-item__grid,
  .cgw-cloud-summary,
  .cgw-additive-guidance,
  .cgw-lab-dictionary,
  .cgw-allergen-grid,
  .cgw-field-grid,
  .cgw-field-grid--recipe-meta,
  .cgw-field-grid--label,
  .cgw-row-grid,
  .cgw-theme-field__controls {
    grid-template-columns: 1fr;
  }

  .cgw-warehouse-badges {
    justify-content: flex-start;
  }

  .cgw-cloud-item,
  .cgw-warehouse-item__head,
  .cgw-warehouse-item__totals,
  .cgw-warehouse-search__row,
  .cgw-cloud-summary,
  .cgw-additive-panel__actions,
  .cgw-guard__actions,
  .cgw-pagination,
  .cgw-label-visibility-row,
  .cgw-label-asset-row__head,
  .cgw-label-asset-row__meta {
    flex-direction: column;
    align-items: stretch;
  }

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

  .cgw-row-card__remove {
    justify-self: start;
  }

  .cgw-cloud-item__meta,
  .cgw-cloud-summary__actions {
    justify-items: stretch;
    justify-content: flex-start;
  }

  .cgw-card__actions {
    width: 100%;
    justify-content: flex-start;
  }

  .cgw-app__nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
  }

  .cgw-app__nav .cg-btn {
    width: 100%;
    min-height: 34px;
    padding: 7px 10px;
    font-size: 11px;
    white-space: normal;
    line-height: 1.12;
    text-align: center;
    box-shadow: none;
  }

  .cgw-savebar__button {
    width: 100%;
  }

  .cgw-card__actions .cg-btn,
  .cgw-card__actions .cg-mini-btn,
  .cgw-cloud-search .cg-btn,
  .cgw-pagination .cg-mini-btn {
    width: auto;
    max-width: 100%;
    flex: 0 1 auto;
    align-self: flex-start;
    min-height: 34px;
    padding: 7px 11px;
    font-size: 11px;
    line-height: 1.2;
  }

  .cgw-cloud-search .cg-input {
    width: 100%;
    min-width: 0;
  }

  .cgw-cloud-search {
    width: 100%;
    max-width: 100%;
  }

  .cgw-app__hero-copy h2 {
    font-size: 34px;
  }

  .cgw-app__hero-meta {
    justify-content: flex-start;
    width: 100%;
    flex: none;
    gap: 8px;
  }

  .cgw-app__security-grid {
    grid-template-columns: 1fr;
  }

  .cgw-app__hero-brand {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .cgw-app__pill {
    min-height: 0;
    padding: 8px 12px;
  }

  .cgw-label-preview-host {
    min-height: 320px;
    padding: 12px;
    justify-content: flex-start;
  }

  .cgw-label-actions {
    flex-direction: column;
  }

  .cgw-confirm-delete {
    border-radius: 16px;
    padding: 16px;
  }

  .cgw-confirm-delete h4 {
    font-size: 20px;
  }

  .cgw-confirm-delete__actions {
    justify-content: stretch;
  }

  .cgw-confirm-delete__btn {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .cgw-field-grid--recipe-meta {
    grid-template-columns: 1fr;
  }
}

/* Mobile 2: modalita app guidata, separata dalla versione classica. */
.cgw-mobile2-topbar,
.cgw-mobile2-bottom-nav,
.cgw-mobile2-stepbar {
  display: none;
}

.cgw-mobile2-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--cgw-border-color);
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, var(--cgw-surface-bg) 100%);
  box-shadow: 0 12px 30px rgba(37, 47, 116, 0.07);
}

.cgw-mobile2-switch strong {
  display: block;
  color: var(--cgw-title-color);
  font-size: 15px;
  line-height: 1.25;
}

.cgw-mobile2-switch small {
  display: block;
  margin-top: 3px;
  color: var(--cgw-text-color);
  font-size: 12px;
  line-height: 1.35;
}

.cgw-mobile2-switch .cg-btn {
  min-height: 34px;
  padding: 8px 14px;
  font-size: 12px;
  white-space: nowrap;
}

.cgw-mobile2-step-hidden {
  display: none !important;
}

.cgw-mobile2-enabled .cgw-mobile2-stepbar {
  display: block;
}

.cgw-mobile2-stepbar {
  position: sticky;
  top: 12px;
  z-index: 12;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid var(--cgw-border-color);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 36px rgba(37, 47, 116, 0.12);
  backdrop-filter: blur(10px);
}

.cgw-mobile2-stepbar__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.cgw-mobile2-stepbar__head strong {
  display: block;
  color: var(--cgw-title-color);
  font-size: 15px;
  line-height: 1.25;
}

.cgw-mobile2-stepbar__head small {
  display: block;
  margin-top: 3px;
  color: var(--cgw-text-color);
  font-size: 12px;
}

.cgw-mobile2-close {
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--cgw-border-color);
  background: #ffffff;
  color: var(--cgw-title-color);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.cgw-mobile2-steps {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 9px 0 3px;
  scrollbar-width: thin;
}

.cgw-mobile2-stepchip {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid var(--cgw-border-color);
  border-radius: 999px;
  background: #ffffff;
  color: var(--cgw-title-color);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.cgw-mobile2-stepchip.is-active {
  border-color: var(--cgw-nav-active);
  background: var(--cgw-nav-active);
  color: var(--cgw-nav-text);
  box-shadow: 0 10px 22px rgba(37, 47, 116, 0.18);
}

.cgw-mobile2-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}

.cgw-mobile2-prev,
.cgw-mobile2-next,
.cgw-mobile2-save {
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 12px;
  border: 1px solid var(--cgw-border-color);
  background: #ffffff;
  color: var(--cgw-title-color);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  text-transform: uppercase;
}

.cgw-mobile2-next {
  border-color: var(--cgw-nav-idle);
  background: var(--cgw-nav-idle);
  color: var(--cgw-nav-text);
}

.cgw-mobile2-save {
  border-color: var(--cgw-save-btn-border);
  background: var(--cgw-save-btn-bg);
  color: var(--cgw-save-btn-text);
}

.cgw-mobile2-navbtn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid var(--cgw-nav-idle);
  border-radius: 14px;
  background: var(--cgw-nav-idle);
  color: var(--cgw-nav-text);
  box-shadow: 0 10px 22px rgba(37, 47, 116, 0.12);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}

.cgw-mobile2-navbtn.is-active {
  border-color: var(--cgw-nav-active);
  background: var(--cgw-nav-active);
}

.cgw-mobile2-navbtn__icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  font-size: 13px;
}

.cgw-mobile2-navbtn--compact {
  min-height: 31px;
  padding: 6px 9px;
  border-radius: 12px;
  font-size: 11px;
  box-shadow: none;
}

.cgw-mobile2-navbtn--compact .cgw-mobile2-navbtn__icon {
  width: 19px;
  height: 19px;
  font-size: 11px;
}

@media (max-width: 900px) {
  body.cgw-mobile2-body {
    padding-top: 52px;
    padding-bottom: 72px;
  }

  .cgw-mobile2-enabled .cgw-mobile2-topbar {
    position: fixed;
    inset: 0 0 auto;
    z-index: 99990;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-bottom: 1px solid var(--cgw-border-color);
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 8px 22px rgba(20, 55, 95, 0.12);
  }

  .cgw-mobile2-topbar > strong {
    flex: 0 0 auto;
    color: var(--cgw-title-color);
    font-size: 13px;
    line-height: 1.1;
    white-space: nowrap;
  }

  .cgw-mobile2-topbar__scroll {
    display: flex;
    flex: 1 1 auto;
    gap: 7px;
    overflow-x: auto;
    padding: 2px 0;
    scrollbar-width: thin;
  }

  .cgw-mobile2-enabled .cgw-mobile2-bottom-nav {
    position: fixed;
    inset: auto 0 0;
    z-index: 99990;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--cgw-border-color);
    background: rgba(247, 251, 255, 0.98);
    box-shadow: 0 -8px 22px rgba(20, 55, 95, 0.12);
    scrollbar-width: thin;
  }

  .cgw-mobile2-enabled .cgw-app__nav {
    display: none !important;
  }

  .cgw-mobile2-enabled .cgw-main {
    gap: 12px;
  }

  .cgw-mobile2-enabled .cgw-app__hero--top {
    margin-top: 4px;
    padding: 14px;
    border-radius: 22px;
  }

  .cgw-mobile2-enabled .cgw-app__hero-brand {
    gap: 12px;
  }

  .cgw-mobile2-enabled .cgw-app__logo {
    width: 74px;
    height: 74px;
  }

  .cgw-mobile2-enabled .cgw-app__hero-copy h2 {
    font-size: clamp(25px, 8vw, 34px);
    line-height: 1.02;
  }

  .cgw-mobile2-enabled .cgw-app__hero-copy p {
    max-width: 100%;
    font-size: 14px;
    line-height: 1.45;
  }

  .cgw-mobile2-enabled .cgw-app__security {
    display: none;
  }

  .cgw-mobile2-enabled .cgw-panel {
    padding: 12px;
    border-radius: 20px;
  }

  .cgw-mobile2-enabled .cg-card {
    padding: 12px;
    border-radius: 18px;
  }

  .cgw-mobile2-enabled .cgw-mobile2-stepbar {
    top: 56px;
    border-radius: 18px;
  }

  .cgw-mobile2-navbtn {
    min-height: 34px;
    padding: 7px 9px;
    border-radius: 13px;
    font-size: 11px;
  }

  .cgw-mobile2-navbtn__icon {
    width: 20px;
    height: 20px;
    font-size: 11px;
  }

  .cgw-mobile2-switch {
    flex-direction: column;
    align-items: stretch;
    border-radius: 18px;
  }

  .cgw-mobile2-switch .cg-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  body.cgw-mobile2-body {
    padding-top: 50px;
    padding-bottom: 70px;
  }

  .cgw-mobile2-enabled .cgw-app {
    gap: 12px;
  }

  .cgw-mobile2-enabled .cgw-app__hero--top {
    padding: 12px;
  }

  .cgw-mobile2-enabled .cgw-app__hero-brand {
    flex-direction: row;
    align-items: center;
  }

  .cgw-mobile2-enabled .cgw-app__logo {
    width: 62px;
    height: 62px;
    border-radius: 18px;
  }

  .cgw-mobile2-enabled .cgw-app__hero-copy h2 {
    font-size: 28px;
  }

  .cgw-mobile2-enabled .cgw-app__hero-copy p {
    font-size: 13px;
  }

  .cgw-mobile2-enabled .cgw-app__hero-meta {
    display: none;
  }

  .cgw-mobile2-topbar > strong {
    max-width: 92px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .cgw-mobile2-stepbar__head {
    align-items: center;
  }

  .cgw-mobile2-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .cgw-mobile2-save {
    grid-column: 1 / -1;
  }
}

/* Mobile 2 refinement: campi a tutta larghezza e step sempre in basso. */
@media (max-width: 900px) {
  body.cgw-mobile2-body {
    padding-bottom: 142px;
  }

  .cgw-mobile2-enabled .cgw-mobile2-bottom-nav {
    display: none !important;
  }

  .cgw-mobile2-enabled .cgw-mobile2-stepbar {
    position: fixed;
    inset: auto 10px calc(8px + env(safe-area-inset-bottom)) 10px;
    top: auto;
    z-index: 99989;
    display: flex;
    flex-direction: column;
    max-height: 124px;
    margin: 0;
    padding: 8px 10px;
    border-radius: 18px;
    overflow: hidden;
  }

  .cgw-mobile2-enabled .cgw-mobile2-stepbar__head {
    margin-bottom: 5px;
  }

  .cgw-mobile2-enabled .cgw-mobile2-stepbar__head strong {
    font-size: 12px;
  }

  .cgw-mobile2-enabled .cgw-mobile2-stepbar__head small {
    margin-top: 1px;
    font-size: 10px;
  }

  .cgw-mobile2-enabled .cgw-mobile2-steps {
    order: 3;
    margin: 6px -2px 0;
    padding: 0 2px 3px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }

  .cgw-mobile2-enabled .cgw-mobile2-stepchip {
    min-height: 24px;
    padding: 4px 8px;
    font-size: 10px;
    scroll-snap-align: start;
  }

  .cgw-mobile2-enabled .cgw-mobile2-controls {
    margin-top: 0;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
  }

  .cgw-mobile2-enabled .cgw-mobile2-prev,
  .cgw-mobile2-enabled .cgw-mobile2-next,
  .cgw-mobile2-enabled .cgw-mobile2-save {
    min-height: 28px;
    padding: 5px 7px;
    font-size: 10px;
    line-height: 1.12;
    border-radius: 11px;
    white-space: normal;
  }

  .cgw-mobile2-enabled .cgw-mobile2-save {
    grid-column: auto;
  }

  .cgw-mobile2-enabled .cgw-field-grid,
  .cgw-mobile2-enabled .cgw-field-grid--recipe-meta,
  .cgw-mobile2-enabled .cgw-field-grid--label,
  .cgw-mobile2-enabled .cgw-row-grid,
  .cgw-mobile2-enabled .cgw-additive-row,
  .cgw-mobile2-enabled .cgw-additive-guidance,
  .cgw-mobile2-enabled .cgw-warehouse-search__row,
  .cgw-mobile2-enabled .cgw-warehouse-item__grid,
  .cgw-mobile2-enabled .cgw-label-layout-grid,
  .cgw-mobile2-enabled .cgw-label-pro-grid,
  .cgw-mobile2-enabled .cgw-label-custom-grid,
  .cgw-mobile2-enabled .cgw-preset-grid {
    grid-template-columns: 1fr !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 12px;
  }

  .cgw-mobile2-enabled .cgw-field,
  .cgw-mobile2-enabled .cgw-row-grid > *,
  .cgw-mobile2-enabled .cgw-additive-row > *,
  .cgw-mobile2-enabled .cgw-warehouse-search__row > *,
  .cgw-mobile2-enabled .cgw-warehouse-item__grid > * {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .cgw-mobile2-enabled .cg-input,
  .cgw-mobile2-enabled input.cg-input,
  .cgw-mobile2-enabled select.cg-input,
  .cgw-mobile2-enabled textarea.cg-input,
  .cgw-mobile2-enabled .cg-select,
  .cgw-mobile2-enabled input[type="text"],
  .cgw-mobile2-enabled input[type="number"],
  .cgw-mobile2-enabled input[type="search"],
  .cgw-mobile2-enabled input[type="url"],
  .cgw-mobile2-enabled input[type="date"],
  .cgw-mobile2-enabled select,
  .cgw-mobile2-enabled textarea {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .cgw-mobile2-enabled .cgw-panel,
  .cgw-mobile2-enabled .cg-card,
  .cgw-mobile2-enabled .cgw-recipe-card,
  .cgw-mobile2-enabled .cgw-item-card,
  .cgw-mobile2-enabled .cgw-warehouse-item,
  .cgw-mobile2-enabled .cgw-nutri-panel,
  .cgw-mobile2-enabled .cgw-additive-panel {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }
}

@media (max-width: 480px) {
  body.cgw-mobile2-body {
    padding-bottom: 140px;
  }

  .cgw-mobile2-enabled .cgw-mobile2-stepbar {
    left: 8px;
    right: 8px;
    max-height: 124px;
    padding: 8px;
  }

  .cgw-mobile2-enabled .cgw-mobile2-stepbar__head strong {
    font-size: 12px;
  }

  .cgw-mobile2-enabled .cgw-mobile2-stepbar__head small {
    font-size: 10px;
  }
}

/* Mobile 2 comfort: meno cornici, piu spazio utile e tooltip leggibili. */
@media (max-width: 900px) {
  body.cgw-mobile2-body {
    padding-bottom: 126px;
  }

  .cgw-mobile2-enabled.cgw-app,
  .cgw-mobile2-enabled .cgw-workspace,
  .cgw-mobile2-enabled .cgw-main {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .cgw-mobile2-enabled .cgw-main {
    gap: 10px;
  }

  .cgw-mobile2-enabled .cgw-panel {
    padding: 10px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(20, 55, 95, 0.07);
    overflow: visible !important;
  }

  .cgw-mobile2-enabled .cg-card {
    padding: 10px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible !important;
  }

  .cgw-mobile2-enabled .cgw-recipe-card,
  .cgw-mobile2-enabled .cgw-item-card,
  .cgw-mobile2-enabled .cgw-warehouse-item,
  .cgw-mobile2-enabled .cgw-nutri-panel,
  .cgw-mobile2-enabled .cgw-additive-panel,
  .cgw-mobile2-enabled .cgw-section-card,
  .cgw-mobile2-enabled .cgw-label-card {
    border-color: rgba(215, 231, 239, 0.72);
    box-shadow: none;
    overflow: visible !important;
  }

  .cgw-mobile2-enabled .cgw-recipe-card,
  .cgw-mobile2-enabled .cgw-item-card,
  .cgw-mobile2-enabled .cgw-warehouse-item {
    padding: 12px;
    border-radius: 18px;
  }

  .cgw-mobile2-enabled .cgw-card__actions {
    gap: 7px;
  }

  .cgw-mobile2-enabled .cg-btn,
  .cgw-mobile2-enabled button.cg-btn,
  .cgw-mobile2-enabled .cgw-card__actions .cg-btn,
  .cgw-mobile2-enabled .cgw-recipe-card .cg-btn,
  .cgw-mobile2-enabled .cgw-item-card .cg-btn {
    min-height: 34px;
    padding: 7px 10px;
    border-radius: 12px;
    font-size: 11px;
    line-height: 1.12;
  }

  .cgw-mobile2-enabled .cgw-mobile2-topbar {
    gap: 6px;
    padding: 6px 7px;
  }

  .cgw-mobile2-topbar > strong {
    max-width: 74px;
    font-size: 12px;
  }

  .cgw-mobile2-topbar__scroll {
    gap: 5px;
  }

  .cgw-mobile2-enabled .cgw-mobile2-navbtn,
  .cgw-mobile2-enabled .cgw-mobile2-navbtn--compact {
    min-height: 28px;
    padding: 5px 8px;
    border-radius: 12px;
    font-size: 10px;
    box-shadow: 0 6px 14px rgba(37, 47, 116, 0.1);
  }

  .cgw-mobile2-enabled .cgw-mobile2-navbtn__icon,
  .cgw-mobile2-enabled .cgw-mobile2-navbtn--compact .cgw-mobile2-navbtn__icon {
    width: 18px;
    height: 18px;
    font-size: 10px;
  }

  .cgw-mobile2-enabled .cgw-mobile2-stepbar {
    left: 8px;
    right: 8px;
    max-height: 108px;
    padding: 6px 8px;
    border-radius: 16px;
    box-shadow: 0 -8px 24px rgba(20, 55, 95, 0.12);
  }

  .cgw-mobile2-enabled .cgw-mobile2-stepbar__head {
    margin-bottom: 3px;
  }

  .cgw-mobile2-enabled .cgw-mobile2-stepbar__head strong {
    font-size: 11px;
  }

  .cgw-mobile2-enabled .cgw-mobile2-stepbar__head small {
    font-size: 9px;
  }

  .cgw-mobile2-enabled .cgw-mobile2-controls {
    gap: 5px;
  }

  .cgw-mobile2-enabled .cgw-mobile2-prev,
  .cgw-mobile2-enabled .cgw-mobile2-next,
  .cgw-mobile2-enabled .cgw-mobile2-save {
    min-height: 25px;
    padding: 4px 5px;
    border-radius: 10px;
    font-size: 9px;
    line-height: 1.08;
  }

  .cgw-mobile2-enabled .cgw-mobile2-steps {
    margin-top: 4px;
    padding-bottom: 2px;
  }

  .cgw-mobile2-enabled .cgw-mobile2-stepchip {
    min-height: 22px;
    padding: 3px 7px;
    font-size: 9px;
  }

  .cgw-mobile2-enabled .cgw-field,
  .cgw-mobile2-enabled .cgw-field-grid,
  .cgw-mobile2-enabled .cgw-row-grid,
  .cgw-mobile2-enabled .cgw-section-grid {
    overflow: visible !important;
  }

  .cgw-mobile2-enabled .cgw-field__title {
    position: relative;
  }

  .cgw-mobile2-enabled .cgw-field__tooltip {
    width: 17px;
    height: 17px;
    z-index: 100000;
  }

  .cgw-mobile2-enabled .cgw-field__tooltip-bubble {
    top: auto;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: min(260px, calc(100vw - 42px));
    max-height: 42vh;
    overflow: auto;
    z-index: 100001;
    font-size: 11px;
    line-height: 1.35;
  }
}

@media (max-width: 480px) {
  body.cgw-mobile2-body {
    padding-top: 46px;
    padding-bottom: 122px;
  }

  .cgw-mobile2-enabled .cgw-panel {
    padding: 8px;
  }

  .cgw-mobile2-enabled .cg-card {
    padding: 8px;
  }

  .cgw-mobile2-enabled .cgw-recipe-card,
  .cgw-mobile2-enabled .cgw-item-card,
  .cgw-mobile2-enabled .cgw-warehouse-item {
    padding: 10px;
  }

  .cgw-mobile2-enabled .cg-btn,
  .cgw-mobile2-enabled button.cg-btn,
  .cgw-mobile2-enabled .cgw-card__actions .cg-btn {
    min-height: 32px;
    padding: 7px 9px;
    font-size: 10px;
  }

  .cgw-mobile2-topbar > strong {
    max-width: 58px;
  }

  .cgw-mobile2-enabled .cgw-mobile2-stepbar {
    left: 6px;
    right: 6px;
    max-height: 106px;
    padding: 6px;
  }
}

.cgw-mobile2-enabled .cgw-mobile2-navbtn,
.cgw-mobile2-enabled .cgw-mobile2-navbtn *,
.cgw-mobile2-enabled .cgw-mobile2-navbtn:focus,
.cgw-mobile2-enabled .cgw-mobile2-navbtn:hover {
  color: var(--cgw-mobile-nav-text, var(--cgw-nav-text)) !important;
  -webkit-text-fill-color: var(--cgw-mobile-nav-text, var(--cgw-nav-text)) !important;
}

.cgw-mobile2-enabled .cgw-mobile2-navbtn {
  background: var(--cgw-mobile-nav-idle, var(--cgw-nav-idle)) !important;
  border-color: var(--cgw-mobile-nav-idle, var(--cgw-nav-idle)) !important;
}

.cgw-mobile2-enabled .cgw-mobile2-navbtn.is-active {
  background: var(--cgw-mobile-nav-active, var(--cgw-nav-active)) !important;
  border-color: var(--cgw-mobile-nav-active, var(--cgw-nav-active)) !important;
}

.cgw-mobile2-guide {
  display: block;
  width: 100%;
  margin: 2px 0 4px;
  padding: 4px 8px;
  border: 1px solid #ffd36e;
  border-radius: 999px;
  background: #fff7d6;
  color: #7a4a00;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  animation: cgw-mobile2-guide-pulse 1.2s ease-in-out 4;
}

@keyframes cgw-mobile2-guide-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(255, 168, 0, 0);
    transform: scale(1);
  }

  50% {
    box-shadow: 0 0 0 5px rgba(255, 168, 0, 0.18);
    transform: scale(1.01);
  }
}

.cgw-mobile2-enabled .cgw-label-preview-host,
.cgw-mobile2-enabled .cgw-label-page--custom,
.cgw-mobile2-enabled .cgw-label__custom-canvas,
.cgw-mobile2-enabled .cgw-label__block.is-draggable {
  touch-action: none;
}

@media (max-width: 900px) {
  body.cgw-mobile2-body {
    padding-bottom: 142px;
  }

  .cgw-mobile2-enabled .cgw-mobile2-stepbar {
    max-height: 132px;
  }
}

@media (max-width: 480px) {
  body.cgw-mobile2-body {
    padding-bottom: 138px;
  }

  .cgw-mobile2-enabled .cgw-mobile2-stepbar {
    max-height: 128px;
  }

  .cgw-mobile2-guide {
    font-size: 9px;
    padding: 3px 6px;
  }
}

/* Mobile 2: un solo riquadro principale, ma anteprima etichetta centrata e leggibile. */
@media (max-width: 900px) {
  .cgw-mobile2-enabled .cgw-panel {
    border: 1px solid var(--cgw-border-color);
  }

  .cgw-mobile2-enabled .cg-card,
  .cgw-mobile2-enabled .cgw-section-card,
  .cgw-mobile2-enabled .cgw-nutri-panel,
  .cgw-mobile2-enabled .cgw-additive-panel,
  .cgw-mobile2-enabled .cgw-label-card {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .cgw-mobile2-enabled .cgw-label-module__preview,
  .cgw-mobile2-enabled .cgw-label-card--preview {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .cgw-mobile2-enabled .cgw-label-card--preview {
    padding-left: 0;
    padding-right: 0;
  }

  .cgw-mobile2-enabled .cgw-label-preview-host {
    justify-content: center !important;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 12px 6px;
    margin-left: auto;
    margin-right: auto;
    overflow-x: auto;
    overflow-y: visible;
  }

  .cgw-mobile2-enabled .cgw-label-preview-host .cgw-label-page {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 480px) {
  .cgw-mobile2-enabled .cgw-label-preview-host {
    padding-left: 4px;
    padding-right: 4px;
  }
}
