.mnl-app {
  font-family: var(--font-sans, 'Plus Jakarta Sans', system-ui, sans-serif);
  color: #111815;
}

.mnl-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding: 12px 16px;
  background: #ffffff;
  border: 1px solid #dfe5de;
  border-radius: 14px;
}

.mnl-mode-tabs {
  display: inline-flex;
  gap: 6px;
  background: #f1f4f0;
  padding: 4px;
  border-radius: 10px;
}

.mnl-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  background: transparent;
  color: #46544e;
  font-weight: 600;
  font-size: 13.5px;
  padding: 8px 14px;
  border-radius: 8px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}

@media (max-width: 640px) {
  .mnl-mode-tabs {
    width: 100%;
    justify-content: space-between;
  }
  .mnl-tab {
    flex: 1;
    justify-content: center;
    padding: 8px 8px;
    font-size: 12.5px;
  }
}

.mnl-tab.is-active {
  background: #14332b;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(20, 51, 43, 0.18);
}

.mnl-tab-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
}

.mnl-sample-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.mnl-sample-lbl {
  font-size: 12.5px;
  color: #5b6862;
  font-weight: 500;
}

.mnl-chip {
  border: 1px solid #d5ddd6;
  background: #f8faf7;
  color: #20312b;
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mnl-chip:hover {
  border-color: #14332b;
  background: #edf3ee;
}

.mnl-chip-import {
  background: #14332b;
  color: #ffffff;
  border-color: #14332b;
}
.mnl-chip-import:hover {
  background: #1b5e46;
  border-color: #1b5e46;
}
.mnl-import-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.mnl-import-file-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.mnl-file-label {
  cursor: pointer;
}

.mnl-chip-clear {
  color: #8c2f2f;
  border-color: #e9d5d5;
  background: #fdf8f8;
}

.mnl-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(320px, 0.92fr);
  gap: 20px;
  align-items: start;
}

@media (max-width: 960px) {
  .mnl-grid {
    grid-template-columns: 1fr;
  }
}

.mnl-inputs-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mnl-card {
  background: #ffffff;
  border: 1px solid #dfe5de;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(17, 24, 21, 0.03);
}

.mnl-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.mnl-card-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #111815;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mnl-badge-usda {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: #e6f4ee;
  color: #126246;
  padding: 3px 8px;
  border-radius: 999px;
}

.mnl-toggle-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: #1b5e46;
  cursor: pointer;
}

.mnl-head-actions {
  display: flex;
  gap: 12px;
}

.mnl-btn-link {
  border: 0;
  background: none;
  color: #145c43;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.mnl-btn-link:hover {
  color: #0c3d2c;
}

.mnl-form-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.mnl-form-grid:last-child {
  margin-bottom: 0;
}

.mnl-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mnl-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mnl-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 640px) {
  .mnl-cols-2, .mnl-cols-3, .mnl-cols-4 {
    grid-template-columns: 1fr;
  }
}

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

.mnl-field label {
  font-size: 12.5px;
  font-weight: 600;
  color: #3f4d47;
}

.mnl-field label small {
  font-weight: 500;
  color: #1b7f5c;
}

.mnl-field input,
.mnl-field select,
.mnl-field textarea,
.mnl-search-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cfd8d1;
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 14px;
  font-family: inherit;
  color: #111815;
  background: #fcfdfb;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mnl-field input:focus,
.mnl-field select:focus,
.mnl-field textarea:focus,
.mnl-search-input:focus {
  outline: none;
  border-color: #14332b;
  box-shadow: 0 0 0 3px rgba(20, 51, 43, 0.1);
  background: #ffffff;
}

.mnl-subdrawer {
  background: #f6f9f5;
  border: 1px solid #d5e0d7;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
}

.mnl-subdrawer-title {
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #14332b;
}

.mnl-subdrawer label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #35453e;
  margin-bottom: 6px;
}

.mnl-subdrawer-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.mnl-paste-status {
  font-size: 12.5px;
  color: #126246;
  font-weight: 600;
}

.mnl-search-wrap {
  position: relative;
  margin-bottom: 12px;
}

.mnl-search-input {
  padding: 11px 14px;
  font-size: 14.5px;
  background: #ffffff;
  border-color: #b7c8bc;
}

.mnl-search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 30;
  background: #ffffff;
  border: 1px solid #c9d5cc;
  border-radius: 12px;
  box-shadow: 0 14px 32px rgba(17, 24, 21, 0.14);
  max-height: 290px;
  overflow-y: auto;
}

.mnl-sr-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid #eef2ee;
  background: #ffffff;
  padding: 10px 13px;
  cursor: pointer;
  font-family: inherit;
}

.mnl-sr-item:last-child { border-bottom: 0; }
.mnl-sr-item:hover { background: #f2f7f3; }
.mnl-sr-name { font-weight: 600; font-size: 13.5px; color: #111815; display: block; }
.mnl-sr-meta { font-size: 11.5px; color: #5b6a63; font-family: var(--font-mono, monospace); }
.mnl-sr-add { font-size: 12px; font-weight: 700; color: #145c43; white-space: nowrap; }

.mnl-ing-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mnl-ing-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.4fr) 74px 86px 76px 28px;
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  background: #f9fbf9;
  border: 1px solid #e4eae4;
  border-radius: 10px;
}

@media (max-width: 640px) {
  .mnl-ing-row {
    grid-template-columns: 1fr 70px 80px 28px;
  }
  .mnl-ing-grams { display: none; }
}

.mnl-ing-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #111815;
  line-height: 1.25;
}

.mnl-ing-sub {
  font-size: 11.5px;
  color: #5b6862;
  margin-top: 2px;
}

.mnl-ing-alg-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  background: #fef3c7;
  color: #92400e;
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 4px;
  vertical-align: middle;
}

.mnl-ing-row input,
.mnl-ing-row select {
  padding: 6px 8px;
  font-size: 13px;
  border: 1px solid #cfd8d1;
  border-radius: 8px;
  background: #ffffff;
  width: 100%;
  box-sizing: border-box;
}

.mnl-ing-grams {
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  color: #4b5a53;
  text-align: right;
}

.mnl-ing-del {
  border: 0;
  background: transparent;
  color: #8c4a4a;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
}

.mnl-ing-del:hover { background: #fbeaea; color: #b91c1c; }

.mnl-empty {
  text-align: center;
  padding: 22px 12px;
  color: #62706a;
  font-size: 13.5px;
  border: 1px dashed #cdd7cf;
  border-radius: 10px;
}

.mnl-recipe-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e6ece7;
}

@media (max-width: 640px) {
  .mnl-recipe-summary { grid-template-columns: repeat(2, 1fr); }
}

.mnl-recipe-summary small {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #617069;
}

.mnl-recipe-summary b {
  font-family: var(--font-mono, monospace);
  font-size: 14.5px;
  color: #14332b;
}

.mnl-format-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.mnl-fmt-btn {
  text-align: left;
  padding: 10px 12px;
  border: 1px solid #d4ddd6;
  border-radius: 10px;
  background: #fafcf9;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mnl-fmt-btn b { display: block; font-size: 13.5px; color: #111815; }
.mnl-fmt-btn span { display: block; font-size: 11.5px; color: #5d6c65; margin-top: 2px; }
.mnl-fmt-btn.is-active {
  border-color: #14332b;
  background: #edf5f0;
  box-shadow: 0 0 0 2px rgba(20, 51, 43, 0.12);
}

.mnl-allergen-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #3f4d47;
  margin-bottom: 8px;
}

.mnl-allergen-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mnl-alg-pill {
  border: 1px solid #d5ddd6;
  background: #ffffff;
  color: #43524b;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
}

.mnl-alg-pill.is-on {
  background: #fef3c7;
  border-color: #d97706;
  color: #92400e;
}

/* RIGHT PREVIEW COLUMN */
.mnl-sticky-box {
  position: sticky;
  top: 84px;
}

.mnl-preview-card {
  background: #ffffff;
  border: 1px solid #d7e0d8;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(17, 24, 21, 0.06);
}

.mnl-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}

.mnl-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #126246;
}

.mnl-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
}

.mnl-fmt-tag {
  font-size: 11.5px;
  font-weight: 600;
  color: #56655e;
  background: #f1f5f2;
  padding: 3px 9px;
  border-radius: 999px;
}

.mnl-svg-stage {
  background: #f4f6f3;
  border: 1px solid #e3e8e2;
  border-radius: 12px;
  padding: 18px 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: auto;
}

.mnl-svg-stage svg {
  max-width: 100%;
  height: auto;
  display: block;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.mnl-statement-box {
  margin-top: 12px;
  padding: 12px;
  background: #fafbf9;
  border: 1px solid #e4eae4;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.5;
}

.mnl-stmt-row { margin-bottom: 6px; color: #202a26; }
.mnl-stmt-alg { color: #92400e; }

.mnl-copy-stmt {
  border: 1px solid #cfd8d1;
  background: #ffffff;
  color: #14332b;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 7px;
  cursor: pointer;
}

.mnl-export-actions {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mnl-export-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mnl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  padding: 11px 14px;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.mnl-btn-full { width: 100%; box-sizing: border-box; }
.mnl-btn-sm { font-size: 12.5px; padding: 8px 12px; }

.mnl-btn-primary {
  background: #14332b;
  color: #ffffff;
}
.mnl-btn-primary:hover { background: #0f2720; }

.mnl-btn-outline {
  background: #ffffff;
  color: #14332b;
  border-color: #b9c9be;
}
.mnl-btn-outline:hover { background: #f2f7f3; border-color: #14332b; }

.mnl-btn-ghost {
  background: transparent;
  color: #3a4942;
  border-color: #d5ddd6;
}

.mnl-pro-tag {
  font-size: 10px;
  font-weight: 800;
  background: #d97706;
  color: #ffffff;
  padding: 2px 5px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

.mnl-save-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 4px;
}

.mnl-saved-count {
  font-size: 12px;
  color: #5b6862;
}

.mnl-pro-nudge {
  margin-top: 12px;
  padding: 13px;
  background: #f0f7f3;
  border: 1px solid #b5d5c5;
  border-radius: 12px;
  font-size: 12.5px;
}

.mnl-pro-nudge-title {
  font-weight: 700;
  color: #14332b;
  margin-bottom: 4px;
}

.mnl-pro-nudge p {
  margin: 0 0 10px;
  color: #374a42;
  line-height: 1.45;
}

.mnl-pro-nudge-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mnl-drafts-box {
  margin-top: 10px;
  padding: 10px;
  background: #f8faf7;
  border: 1px solid #e1e8e2;
  border-radius: 10px;
  font-size: 12.5px;
}

.mnl-draft-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid #e9eee9;
}
.mnl-draft-item:last-child { border-bottom: 0; }

.mnl-audit-details {
  margin-top: 12px;
  border-top: 1px solid #e6ece7;
  padding-top: 10px;
  font-size: 12.5px;
}

.mnl-audit-details summary {
  cursor: pointer;
  font-weight: 600;
  color: #2f4139;
}

.mnl-audit-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 11.5px;
  font-family: var(--font-mono, monospace);
}

.mnl-audit-table th,
.mnl-audit-table td {
  padding: 4px 6px;
  border-bottom: 1px solid #edf1ed;
  text-align: left;
}

.mnl-disclaimer-mini {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: #6b7972;
}

.mnl-fab-preview {
  display: none;
}

@media (max-width: 960px) {
  .mnl-fab-preview {
    position: fixed;
    right: 16px;
    bottom: 18px;
    z-index: 45;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 11px 16px;
    border: 1px solid #0e2620;
    border-radius: 999px;
    background: #14332b;
    color: #ffffff;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 700;
    box-shadow: 0 10px 26px rgba(17, 24, 21, 0.28);
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
  }
  .mnl-fab-preview:active {
    transform: scale(0.97);
  }
  .mnl-fab-preview.is-on-preview {
    background: #ffffff;
    color: #14332b;
    border-color: #14332b;
  }
  .mnl-fab-cal {
    font-family: var(--font-mono, monospace);
    font-size: 12px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(134, 239, 172, 0.2);
    color: #86efac;
  }
  .mnl-fab-preview.is-on-preview .mnl-fab-cal {
    display: none;
  }
}

@media print {
  header, footer, .mnl-toolbar, .mnl-inputs-col, .mnl-export-actions, .mnl-pro-nudge, .mnl-audit-details, .mnl-preview-head, .mnl-copy-stmt, .mnl-drafts-box, .mnl-section, .mnl-hero-head, .mnl-spec-ruler, .mnl-fab-preview {
    display: none !important;
  }
  .mnl-grid { display: block !important; }
  .mnl-preview-card, .mnl-svg-stage {
    border: 0 !important;
    box-shadow: none !important;
    background: #ffffff !important;
    padding: 0 !important;
  }
}
