/* Approved business-page treatment: one green header and a floating summary.
 * The existing screen, amounts, header controls and navigation own all state.
 */
.phone.next-ui-theme {
  --business-hero-surface: #dceee5;
  --business-hero-ink: #183e32;
  --business-hero-accent: #1e624f;
  --business-hero-line: #c3dacf;
  --business-page-gutter: 20px;
  --business-summary-surface: var(--biz-surface, #fff);
  --business-summary-ink: var(--biz-ink, #202422);
  --business-summary-muted: var(--biz-muted, #606a65);
  --business-summary-line: #e1e8e3;
}

/* :has follows the existing active screen, including service/back navigation. */
.phone.next-ui-theme .app-shell:has(#screen-business.active) > .app-header {
  background: var(--business-hero-surface);
  color: var(--business-hero-ink);
  border-bottom-color: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.phone.next-ui-theme .app-shell:has(#screen-business.active) > .app-header.has-scrolled-content {
  border-bottom-color: var(--business-hero-line);
}

.phone.next-ui-theme .app-shell:has(#screen-business.active) > .app-header .profile :is(small, strong),
.phone.next-ui-theme .app-shell:has(#screen-business.active) > .app-header .header-actions button {
  color: var(--business-hero-ink);
}

.phone.next-ui-theme .app-shell:has(#screen-business.active) > .app-header .header-actions button {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.phone.next-ui-theme .app-shell:has(#screen-business.active) > .app-header .next-header-card-shortcut::after {
  border-color: var(--business-hero-surface);
}

.phone.next-ui-theme #screen-business {
  padding-top: 0;
  padding-inline: var(--business-page-gutter);
}

.phone.next-ui-theme #screen-business > .next-page-intro {
  position: relative;
  isolation: isolate;
  margin: 0 calc(-1 * var(--business-page-gutter));
  padding: 24px var(--business-page-gutter) 70px;
  border-radius: 0 0 60px 0;
  background: var(--business-hero-surface);
  color: var(--business-hero-ink);
}

/* Native top overscroll reveals space above the moving hero. Extend its own
 * paint into that space so it stays joined to the fixed green header; the
 * regular canvas and the bottom overscroll keep their existing background. */
.phone.next-ui-theme #screen-business > .next-page-intro::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 100%;
  height: 100vh;
  background: var(--business-hero-surface);
  pointer-events: none;
}

.phone.next-ui-theme #screen-business > .next-page-intro::after {
  content: "";
  position: absolute;
  left: var(--business-page-gutter);
  bottom: 61px;
  width: 88px;
  height: 88px;
  border-radius: 28px 6px 28px 6px;
  background: var(--business-hero-accent);
  opacity: .085;
  transform: rotate(-12deg);
  pointer-events: none;
}

.phone.next-ui-theme #screen-business > .next-page-intro > * {
  position: relative;
  z-index: 1;
}

.phone.next-ui-theme #screen-business > .next-page-intro > span,
.phone.next-ui-theme #screen-business > .next-page-intro > p {
  color: var(--business-hero-ink);
  font-family: "Vazirmatn Regular", Tahoma, sans-serif;
  font-size: 12px !important;
  line-height: 22px;
}

.phone.next-ui-theme #screen-business > .next-page-intro > h1 {
  margin: 4px 0 6px;
  color: var(--business-hero-accent);
  font-family: "Vazirmatn SemiBold", Tahoma, sans-serif;
  font-size: 28px !important;
  line-height: 40px;
  letter-spacing: 0;
}

.phone.next-ui-theme #screen-business > .next-business-summary {
  position: relative;
  z-index: 1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 24px;
  margin-top: -43px;
  padding: 14px 16px;
  border: 1px solid var(--business-summary-line);
  border-radius: 22px;
  background: var(--business-summary-surface);
  color: var(--business-summary-ink);
  box-shadow: 0 8px 22px rgb(20 57 37 / 6.5%);
}

.phone.next-ui-theme #screen-business > .next-business-summary > article {
  min-width: 0;
  padding: 8px 0 0;
  border: 0;
}

.phone.next-ui-theme #screen-business > .next-business-summary > .business-summary-sales {
  position: relative;
  grid-column: 1 / -1;
  padding: 0 0 8px;
  border-bottom: 1px solid var(--business-summary-line);
}

.phone.next-ui-theme #screen-business > .next-business-summary > .business-summary-cashflow {
  position: relative;
}

.phone.next-ui-theme #screen-business .business-summary-cashflow::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 2px;
  right: -12px;
  width: 1px;
  background: var(--business-summary-line);
}

.phone.next-ui-theme #screen-business > .next-business-summary :is(small, span) {
  color: var(--business-summary-muted);
  font-family: "Vazirmatn Regular", Tahoma, sans-serif;
  font-size: 11px !important;
  line-height: 18px;
}

.phone.next-ui-theme #screen-business > .next-business-summary strong {
  margin: 0;
  color: var(--business-summary-ink);
  font-family: "Vazirmatn SemiBold", Tahoma, sans-serif;
  font-size: 20px !important;
  line-height: 26px;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.phone.next-ui-theme #screen-business .business-summary-value {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  column-gap: 6px;
}

.phone.next-ui-theme #screen-business .business-summary-value > span {
  white-space: nowrap;
}

.phone.next-ui-theme #screen-business .business-summary-sales .business-summary-value strong {
  font-size: 30px !important;
  line-height: 36px;
}

.phone.next-ui-theme #screen-business .business-summary-sales .business-summary-value bdi {
  font: inherit;
}

.phone.next-ui-theme #screen-business .business-summary-sales .business-summary-icon {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  color: var(--business-hero-accent);
  background: #f0f6f2;
}

.phone.next-ui-theme #screen-business .business-summary-icon svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.75;
}

.phone.next-ui-theme #screen-business .business-summary-cashflow strong {
  font-size: 16px !important;
}

.phone.next-ui-theme #screen-business .business-summary-cashflow strong.is-positive {
  color: var(--business-hero-accent);
}

@media (max-width: 390px) {
  .phone.next-ui-theme {
    --business-page-gutter: 16px;
  }

  .phone.next-ui-theme #screen-business > .next-business-summary {
    padding-inline: 12px;
  }
}

/* Business SCF service entry follows the approved home card's visual language. */
.phone.next-ui-theme #next-business-scf-entry {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 0;
  padding: 16px;
  border: 1px solid var(--business-summary-line, #e1e8e3);
  border-radius: 22px;
  color: var(--business-summary-ink, #202422);
  background: var(--business-summary-surface, #fff);
  box-shadow: 0 2px 12px rgb(20 57 37 / 4%);
  text-align: right;
}

#next-business-scf-entry > .business-scf-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  color: var(--business-hero-accent, #1e624f);
  background: #eef5f0;
  box-shadow: none;
}

#next-business-scf-entry .business-scf-mark > svg {
  display: block;
  width: 22px;
  height: 22px;
  min-width: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#next-business-scf-entry > .business-scf-heading {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

#next-business-scf-entry .business-scf-heading > strong {
  color: var(--business-summary-ink, #202422);
  font-family: var(--biz-font-semibold, "Vazirmatn SemiBold", Tahoma, sans-serif);
  font-size: 15px !important;
  line-height: 24px;
}

#next-business-scf-entry .business-scf-heading > small {
  color: var(--business-summary-muted, #606a65);
  font-family: var(--biz-font-regular, "Vazirmatn Regular", Tahoma, sans-serif);
  font-size: 12px !important;
  line-height: 20px;
}

#next-business-scf-entry > .business-scf-footer {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding-top: 12px;
  border-top: 1px solid var(--business-summary-line, #e1e8e3);
}

#next-business-scf-entry .business-scf-status {
  width: fit-content;
  max-width: 100%;
  padding: 2px 8px;
  border: 0;
  border-radius: 7px;
  color: var(--biz-tag-ink, #606a65);
  background: var(--biz-tag-surface, #f3f5f3);
  font-family: var(--biz-font-medium, "Vazirmatn Medium", Tahoma, sans-serif);
  font-size: 12px !important;
  line-height: 20px;
  white-space: normal;
  overflow-wrap: anywhere;
}

#next-business-scf-entry .business-scf-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-inline-start: auto;
  color: var(--business-hero-accent, #1e624f);
  font-family: var(--biz-font-medium, "Vazirmatn Medium", Tahoma, sans-serif);
  font-size: 12px !important;
  line-height: 24px;
  white-space: nowrap;
}

#next-business-scf-entry .business-scf-action > svg {
  display: block;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.phone.next-ui-theme #next-business-scf-entry:focus-visible {
  outline: 2px solid var(--business-hero-accent, #1e624f);
  outline-offset: 3px;
}
