/* GLB AI Suite v0.4 enhancements */
.v4-module-banner {
  margin-top: 25px;
  border-radius: 16px;
  background: linear-gradient(115deg, #152d37, #234c4a);
  color: #fff;
  padding: 29px 33px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  box-shadow: 0 15px 35px #142b3014;
}
.v4-module-banner h2 {
  font-size: 23px;
  font-weight: 780;
  letter-spacing: -0.7px;
  margin: 8px 0;
}
.v4-module-banner p {
  color: #cbddda;
  max-width: 680px;
  line-height: 1.65;
  font-size: 12px;
  margin: 0 0 18px;
}
.v4-overline {
  font-size: 10px;
  letter-spacing: 1.7px;
  color: #70c2b2;
  font-weight: 850;
}
.v4-banner-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 15px;
}
.v4-banner-stats {
  display: grid;
  grid-template-columns: auto auto;
  gap: 8px 18px;
  min-width: 145px;
  align-items: center;
}
.v4-banner-stats span {
  font-size: 10px;
  color: #acccc6;
}
.v4-banner-stats b {
  font-size: 24px;
  text-align: right;
}
.v4-pills {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 2px 0 23px;
}
.v4-pills button {
  background: white;
  color: #65737d;
  padding: 9px 15px;
  border-radius: 8px;
  border: 1px solid #e2eaeb;
  font-size: 12px;
  font-weight: 720;
}
.v4-pills button.active {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}
.v4-feature-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 0 23px;
}
.v4-feature-head h2 {
  font-size: 21px;
  margin: 5px 0;
}
.v4-feature-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  max-width: 650px;
}
.v4-step {
  font-size: 11px;
  border-radius: 14px;
  color: var(--teal-dark);
  padding: 8px 13px;
  background: var(--soft-teal);
  font-weight: 750;
}
.v4-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 20px;
}
.v4-grid3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}
.v4-kpi {
  padding: 22px 21px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  min-height: 128px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  box-shadow: var(--shadow);
}
.v4-kpi > span {
  font-size: 11px;
  color: #65757f;
  font-weight: 750;
}
.v4-kpi strong {
  font-size: 27px;
  letter-spacing: -0.7px;
  font-weight: 800;
}
.v4-kpi small {
  font-size: 10px;
  color: #63757d;
}
.v4-kpi-icon {
  position: absolute;
  right: 18px;
  top: 18px;
  background: #e6f4f0;
  padding: 9px;
  border-radius: 10px;
  color: var(--teal);
}
.v4-kpi-icon svg {
  width: 17px;
  height: 17px;
}
.v4-file-drop {
  border: 2px dashed #d2e1e0;
  border-radius: 13px;
  padding: 24px 19px;
  text-align: center;
  background: linear-gradient(180deg, #f9fdfc, #fff);
  cursor: pointer;
}
.v4-file-drop h3 {
  font-size: 17px;
  margin: 10px 0 6px;
}
.v4-file-drop p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.65;
  margin: 0 auto 15px;
  max-width: 340px;
}
.v4-file-icon {
  color: var(--teal);
  display: grid;
  place-items: center;
}
.v4-file-icon svg {
  width: 30px;
  height: 30px;
}
.v4-textarea {
  min-height: 165px;
  width: 100%;
  resize: vertical;
  background: #fbfdfd;
  border: 1px solid #dce8e7;
  border-radius: 9px;
  line-height: 1.6;
  padding: 12px;
}
.v4-review-list {
  max-height: 430px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
  margin: 12px 0;
}
.v4-review-row {
  padding: 10px 8px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.v4-review-row:last-child {
  border: 0;
}
.v4-review-row input {
  accent-color: var(--teal);
  width: 17px;
  height: 17px;
}
.v4-review-row span {
  flex: 1;
  min-width: 0;
}
.v4-review-row strong {
  display: block;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v4-review-row small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
}
.v4-review-row b {
  font-size: 12px;
}
.v4-review-actions {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.v4-check {
  font-size: 11px;
  color: #5f747d;
  display: flex;
  align-items: center;
  gap: 5px;
}
.v4-footnote {
  font-size: 10px;
  color: #67767d;
  margin-top: 14px;
  line-height: 1.7;
}
.v4-empty {
  border: 1px dashed #d8e4e4;
  background: #f9fbfb;
  border-radius: 12px;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 9px;
  color: #8b9b9f;
}
.v4-empty svg {
  width: 27px;
  height: 27px;
}
.v4-empty strong {
  font-size: 13px;
  color: #536c75;
}
.v4-empty span {
  font-size: 11px;
  max-width: 290px;
  line-height: 1.55;
}
.v4-list {
  display: grid;
  margin: 12px 0;
}
.v4-list-row {
  display: flex;
  text-align: left;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: white;
  color: var(--ink);
  min-height: 62px;
  width: 100%;
}
.v4-list-row:hover {
  background: #f5faf9;
}
.v4-list-row > span:first-child {
  min-width: 0;
}
.v4-list-row strong {
  display: block;
  font-size: 12px;
  font-weight: 750;
  word-break: break-word;
}
.v4-list-row small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
  margin-top: 4px;
}
.v4-amount {
  text-align: right;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}
.v4-link {
  display: block;
  color: var(--teal);
  font-size: 10px;
  font-weight: 800;
  margin-top: 5px;
}
.v4-scroll {
  max-height: 510px;
  overflow: auto;
}
.v4-import-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 9px;
  background: #f3f7f7;
  padding: 12px 13px;
  border-radius: 9px;
  margin-top: 14px;
}
.v4-import-strip > span {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 700;
}
.v4-import-strip svg {
  width: 17px;
  height: 17px;
  color: var(--teal);
}
.v4-modal-large {
  width: min(100%, 760px);
}
.v4-ingredient-row {
  display: grid;
  grid-template-columns: minmax(140px, 2.2fr) minmax(75px, 1fr) minmax(100px, 1fr) 35px;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
}
.v4-ingredient-row input,
.v4-ingredient-row select {
  padding: 10px;
  border: 1px solid #dce7e7;
  border-radius: 8px;
  min-width: 0;
  width: 100%;
  background: #fff;
}
.v4-ingredient-row button {
  padding: 7px;
}
.v4-toolbar {
  display: flex;
  gap: 18px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.v4-toolbar h3 {
  margin: 0 0 5px;
  font-size: 16px;
}
.v4-toolbar p {
  font-size: 11px;
  color: #68747c;
  margin: 0;
  line-height: 1.5;
}
.v4-toolbar-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.v4-stock-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.v4-stock-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 11px;
  padding: 17px;
  text-align: left;
  display: flex;
  flex-direction: column;
  min-height: 176px;
  gap: 6px;
  transition:
    box-shadow 0.16s,
    transform 0.16s;
}
.v4-stock-card:hover {
  box-shadow: 0 9px 20px #103e3913;
  transform: translateY(-2px);
}
.v4-stock-card strong {
  font-size: 13px;
}
.v4-stock-card small {
  color: #657680;
  font-size: 10px;
}
.v4-stock-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 7px;
}
.v4-stock-icon {
  display: grid;
  place-items: center;
  background: #ecf7f4;
  color: var(--teal);
  padding: 7px;
  border-radius: 7px;
}
.v4-stock-icon svg {
  width: 16px;
  height: 16px;
}
.v4-date {
  font-size: 10px;
  color: #67767d;
}
.v4-stock-value {
  font-size: 23px;
  font-weight: 780;
  letter-spacing: -0.4px;
  color: #1d4d47;
  margin-top: 4px;
}
.v4-count-form {
  display: grid;
  gap: 3px;
}
.v4-quantity-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.v4-wide {
  width: 100%;
  margin-top: 6px;
}
.v4-hint,
.v4-p {
  font-size: 11px;
  color: #64757f;
  line-height: 1.7;
}
.v4-vision-stage {
  min-height: 182px;
  border: 1px dashed #cedfdd;
  border-radius: 11px;
  background: #f9fcfb;
  display: grid;
  place-items: center;
  gap: 5px;
  overflow: hidden;
  padding: 10px;
  color: #5c7674;
}
.v4-vision-stage > svg {
  width: 34px;
  height: 34px;
}
.v4-vision-stage span {
  font-size: 11px;
  text-align: center;
}
.v4-vision-stage img {
  max-width: 100%;
  max-height: 245px;
  object-fit: contain;
  border-radius: 7px;
}
.v4-vision-controls {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.v4-ai-hint {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #cde6e1;
  border-radius: 9px;
  background: #f8fcfb;
}
.v4-ai-hint > strong {
  font-size: 12px;
}
.v4-ai-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 0;
  border-top: 1px solid #e4f0ed;
}
.v4-ai-row b {
  font-size: 11px;
}
.v4-ai-row small {
  display: block;
  font-size: 10px;
  color: #839690;
  margin-top: 4px;
}
.v4-assumptions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 12px;
}
.v4-assumptions .field {
  margin-bottom: 0;
}
.v4-forecast-note {
  background: #f3f8f8;
  border-radius: 9px;
  margin-top: 19px;
  font-size: 11px;
  color: #5b7374;
  padding: 12px 15px;
  line-height: 1.6;
}
.v4-count-form input,
.v4-count-form select {
  font-size: 15px;
  min-height: 49px;
}
.v4-count-form .btn {
  min-height: 48px;
}
@media (max-width: 1250px) {
  .v4-stock-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .v4-assumptions {
    grid-template-columns: repeat(3, 1fr);
  }
  .v4-assumptions button {
    grid-column: 1/-1;
  }
}
@media (max-width: 950px) {
  .v4-two {
    grid-template-columns: 1fr;
  }
  .v4-stock-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 630px) {
  .v4-grid3 {
    grid-template-columns: 1fr;
  }
  .v4-stock-grid {
    grid-template-columns: 1fr;
  }
  .v4-module-banner {
    padding: 21px;
    align-items: flex-start;
    flex-direction: column;
  }
  .v4-feature-head {
    align-items: flex-start;
    gap: 8px;
  }
  .v4-feature-head h2 {
    font-size: 18px;
  }
  .v4-step {
    display: none;
  }
  .v4-banner-stats {
    display: flex;
    gap: 10px;
    align-items: center;
  }
  .v4-banner-stats b {
    font-size: 19px;
  }
  .v4-ingredient-row {
    grid-template-columns: 1fr 70px 65px 30px;
    gap: 4px;
  }
  .v4-ingredient-row input,
  .v4-ingredient-row select {
    font-size: 11px;
    padding: 7px 4px;
  }
  .v4-assumptions {
    grid-template-columns: 1fr 1fr;
  }
  .v4-quantity-fields {
    grid-template-columns: 1fr 1fr;
  }
  .v4-pills {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 5px;
  }
  .v4-pills button {
    white-space: nowrap;
  }
}
.v4-vat-select {
  width: 69px;
  border: 1px solid #dce5e4;
  border-radius: 6px;
  background: #fff;
  color: #49656c;
  font-size: 11px;
  padding: 6px 4px;
}

/* Website revision: recipe cost against article cost */
.v4-cost-diff {
  display: block;
  margin-top: 3px;
  color: #12685d;
}
.v4-cost-diff.warn {
  color: #9a5a12;
}
.v4-cost-diff.warn::before {
  content: "⚠ ";
}
.v4-unit-tag {
  font-weight: 600;
  color: var(--teal-dark);
  margin-left: 4px;
}
