/* Bloom-style free live invoice / contract demos — Soft UI */

.bloom-live {
  position: relative;
  overflow: hidden;
  background: var(--neu-bg);
}

.bloom-live::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 45% at 15% 10%, rgba(255, 255, 255, .85), transparent 55%),
    radial-gradient(ellipse 45% 35% at 85% 15%, rgba(249, 115, 22, .08), transparent 50%);
  opacity: .9;
}

.bloom-live > .container {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 40px), 1760px);
  max-width: none;
}

.bloom-live .invoice-showcase-heading {
  max-width: 640px;
  margin: 0 auto 20px;
  text-align: center;
}

.bloom-live .section-kicker {
  margin-bottom: 10px;
}

.bloom-live .invoice-showcase-heading h1,
.bloom-live .invoice-showcase-heading h2 {
  margin: 0 0 8px;
  color: var(--navy-950);
  font-size: clamp(1.85rem, 3.5vw, 2.45rem);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.05;
}

.bloom-live .invoice-showcase-heading h2 em {
  font-style: normal;
  color: var(--orange-500);
}

.bloom-live .invoice-showcase-heading p {
  margin: 0 auto;
  max-width: 46ch;
  color: var(--text-secondary);
  font-size: .82rem;
  line-height: 1.55;
}

.bloom-live-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
}

.bloom-live-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  height: auto;
  align-self: stretch;
}

.bloom-live-main .bloom-form,
.bloom-live-main .bloom-promo {
  flex: 0 0 auto;
  border-radius: 18px;
}

.bloom-live-side {
  display: flex;
  flex-direction: column;
  min-width: 0;
  align-self: stretch;
  height: auto;
  min-height: 100%;
}

.bloom-live-side .bloom-preview-wrap {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-self: stretch;
  height: 100%;
  min-height: 100%;
  border-radius: 18px;
}

.bloom-panel {
  position: relative;
  padding: 18px 18px 16px;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-raised);
}

.bloom-panel::before {
  display: none;
}

.bloom-preview-wrap::before {
  opacity: .55;
}

.bloom-panel-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.bloom-panel-head h3 {
  margin: 0;
  color: var(--navy-950);
  font-family: var(--font-ui);
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -.025em;
}

.bloom-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  box-shadow:
    -4px -4px 10px rgba(255, 255, 255, .5),
    6px 6px 14px rgba(13, 39, 80, .12);
  font-size: .55rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.bloom-live-badge::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .35);
  content: "";
  animation: bloom-pulse 1.6s ease-in-out infinite;
}

@keyframes bloom-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .55; transform: scale(.85); }
}

.bloom-options-btn {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--navy-950);
  background: var(--white);
  box-shadow: none;
  cursor: pointer;
  font-size: .68rem;
  font-weight: 600;
  transition: background .18s ease, border-color .18s ease;
}

.bloom-options-btn:hover {
  background: var(--neu-bg);
  border-color: rgba(15, 23, 42, .16);
}

.bloom-form {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
}

.bloom-meta-row,
.bloom-address-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.bloom-meta-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.bloom-field {
  display: grid;
  gap: 4px;
  align-content: end;
}

.bloom-field > span,
.bloom-pay-label {
  color: #5a6578;
  font-size: .52rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* Always show field labels so users know what to enter. */
.bloom-form .bloom-field > span {
  display: block;
}

.bloom-form .bloom-field:has(input[type="date"]) > span,
.bloom-form .bloom-field:has(select) > span {
  display: block;
}

.bloom-form .input::placeholder,
.bloom-form textarea.input::placeholder {
  color: #8a93a3;
  opacity: 1;
  font-size: .72rem;
  font-weight: 600;
}

.bloom-form select.input option[value=""][disabled] {
  color: #8a93a3;
}

.bloom-form select.input:required:invalid {
  color: #8a93a3;
  font-weight: 600;
}

.bloom-form .input,
.bloom-form input,
.bloom-form select,
.bloom-form textarea {
  width: 100%;
  min-height: 40px;
  height: 40px;
  padding: 8px 11px;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--navy-950);
  background: var(--white);
  box-shadow: var(--shadow-inset-sm);
  font: inherit;
  font-size: .74rem;
  font-weight: 600;
  transition: box-shadow .2s ease;
}

.bloom-form textarea {
  min-height: 64px;
  height: auto;
  padding: 8px 11px;
  resize: vertical;
  line-height: 1.4;
}

.bloom-form .input:hover,
.bloom-form input:hover,
.bloom-form select:hover,
.bloom-form textarea:hover {
  box-shadow: var(--shadow-inset-sm);
}

.bloom-form .input:focus,
.bloom-form input:focus,
.bloom-form select:focus,
.bloom-form textarea:focus {
  outline: none;
  box-shadow:
    var(--shadow-inset-sm),
    0 0 0 3px rgba(249, 115, 22, .18);
}

.bloom-items {
  padding: 10px;
  border-radius: var(--radius-md);
  background: var(--neu-bg);
  box-shadow: var(--shadow-inset-sm);
}

.bloom-items-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px 110px;
  gap: 8px;
  margin-bottom: 10px;
  padding: 0 4px;
  color: #5a6578;
  font-size: .55rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.bloom-item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px 110px;
  gap: 8px;
}

.bloom-item-row .input,
.bloom-item-row input {
  background: var(--white);
}

.bloom-chip {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--navy-950);
  background: var(--white);
  box-shadow: none;
  cursor: pointer;
  font-size: .68rem;
  font-weight: 600;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.bloom-chip:hover {
  background: var(--neu-bg);
}

.bloom-chip.is-active {
  color: var(--orange-600);
  border-color: rgba(249, 115, 22, .35);
  background: rgba(249, 115, 22, .08);
}

.bloom-branding-inline {
  margin-top: 2px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--neu-bg);
  box-shadow: var(--shadow-inset-sm);
  display: grid;
  gap: 14px;
}

.bloom-branding-head {
  margin-bottom: 0;
}

.bloom-branding-head h3 {
  font-size: 1rem;
}

.bloom-upload-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.bloom-upload {
  min-height: 56px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--navy-950);
  background: var(--white);
  box-shadow: none;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: .72rem;
  font-weight: 600;
  text-align: center;
  transition: border-color .18s ease, color .18s ease, background .18s ease;
}

.bloom-upload:hover {
  color: var(--orange-600);
  border-color: rgba(249, 115, 22, .35);
  background: rgba(249, 115, 22, .04);
}

.bloom-cover-presets {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.bloom-cover {
  aspect-ratio: 1;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-raised-sm);
  transition: border-color .2s ease, box-shadow .2s ease;
  min-height: 0;
  max-height: 64px;
}

.bloom-cover:hover {
  border-color: rgba(15, 23, 42, .12);
}

.bloom-cover span {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--text-secondary);
  font-size: .5rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.bloom-cover.is-active {
  border-color: var(--orange-500);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, .15);
}

.bloom-cover.cover-a { background: linear-gradient(135deg, #ff6b9d, #7c5cff); }
.bloom-cover.cover-b { background: linear-gradient(135deg, #22d3ee, #2563eb); }
.bloom-cover.cover-c { background: linear-gradient(135deg, #fbbf24, #f97316); }
.bloom-cover.cover-d { background: linear-gradient(135deg, #34d399, #059669); }

.bloom-cta-row {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 12px;
  align-items: stretch;
}

.bloom-download-btn {
  position: relative;
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--white);
  background: var(--orange-500);
  box-shadow: none;
  cursor: pointer;
  font-size: .78rem;
  font-weight: 600;
  transition: background .18s ease, opacity .18s ease;
}

.bloom-download-btn:hover {
  background: var(--orange-600);
}

.bloom-download-btn:active {
  opacity: .88;
}

.bloom-download-btn:disabled {
  opacity: .65;
  cursor: wait;
}

.bloom-continue-btn {
  width: 100%;
  min-height: 44px;
  border-radius: var(--radius-sm) !important;
  font-size: .78rem !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}

.bloom-live .live-demo-note {
  margin: 0;
  color: var(--text-secondary);
  font-size: .68rem;
  line-height: 1.5;
  text-align: center;
}

.bloom-pay-options {
  display: grid;
  gap: 10px;
}

.bloom-pay-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.bloom-promo {
  position: relative;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-raised);
  overflow: hidden;
}

.bloom-promo::after {
  content: "";
  position: absolute;
  width: 140px;
  height: 140px;
  top: -50px;
  right: -40px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(249, 115, 22, .12), transparent 70%);
  pointer-events: none;
}

.bloom-promo h4 {
  position: relative;
  z-index: 1;
  margin: 0 0 14px;
  color: var(--navy-950);
  font-family: var(--font-ui);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -.02em;
}

.bloom-promo ul {
  position: relative;
  z-index: 1;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
}

.bloom-promo li {
  position: relative;
  padding-left: 18px;
  color: #3f4a5c;
  font-size: .7rem;
  font-weight: 600;
  line-height: 1.4;
}

.bloom-promo li::before {
  position: absolute;
  left: 0;
  top: 1px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  color: #fff;
  background: var(--orange-500);
  content: "✓";
  font-weight: 800;
  font-size: .5rem;
  line-height: 14px;
  text-align: center;
}

.bloom-promo .button {
  position: relative;
  z-index: 1;
}

/* Preview card fills the right column to match left stack height. */
.bloom-preview-wrap {
  position: relative;
  top: auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: 18px;
  min-height: 100%;
  border-radius: 18px;
}

.bloom-preview-frame {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  padding: 10px;
  border-radius: 14px;
  background: #d5d8de;
  box-shadow: var(--shadow-inset);
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

.bloom-live .live-doc {
  width: 100%;
  max-width: none;
  flex: 1 1 auto;
  height: 100%;
  min-height: 100%;
  aspect-ratio: auto !important;
  padding: 0 !important;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow:
    0 18px 42px rgba(13, 39, 80, .16),
    0 2px 0 rgba(255, 255, 255, .8) inset;
  display: flex !important;
  flex-direction: column;
  gap: 0;
}

/* Keep preview labels visible; empty values stay soft instead of hiding. */
.bloom-live [data-hide-when-empty],
.bloom-live [data-hide-when-empty].is-empty {
  display: revert !important;
  opacity: 1;
}

.live-doc-banner {
  flex: 0 0 auto;
  min-height: 0;
  height: 0;
  background-size: cover;
  background-position: center;
  transition: height .3s ease;
}

.live-doc-banner.has-cover {
  height: 88px;
}

.live-doc-body {
  flex: 1 1 auto;
  display: flex !important;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px 14px;
  min-height: 0;
}

.live-doc-grow {
  display: block !important;
  flex: 1 1 auto;
  min-height: 48px;
  margin: 4px 0;
  border: 0;
  background:
    linear-gradient(90deg, transparent, rgba(126, 47, 139, .1), transparent)
    center / 100% 1px no-repeat;
}

.bloom-live .live-doc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 3px solid var(--orange-500);
}

.bloom-live .live-doc-head strong {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: .06em;
}

.bloom-live .live-doc-head span {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: .62rem;
  font-weight: 800;
  color: #fff;
  background: var(--orange-500);
  letter-spacing: .1em;
}

.live-doc-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-doc-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(13, 39, 80, .12);
}

.live-doc-logo.hidden { display: none; }

.bloom-live .live-doc-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.live-doc-card {
  padding: 12px 14px;
  border-radius: 14px;
  background: #f6f7f9;
  border: 1px solid rgba(13, 39, 80, .06);
}

.live-doc-card-accent {
  background: linear-gradient(145deg, #fff7f2, #fff1e8);
  border-color: rgba(255, 107, 24, .2);
}

.bloom-live .live-doc-meta small,
.live-doc-clause small,
.live-doc-bank small {
  display: block;
  margin-bottom: 5px;
  font-size: .52rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #8a93a3;
}

.bloom-live .live-doc-meta pre {
  margin: 0;
  color: #0d2750;
  font-family: var(--font-ui);
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.45;
  white-space: pre-wrap;
}

.bloom-live .live-doc-meta b {
  display: block;
  font-size: .9rem;
  color: #0d2750;
}

.bloom-live .live-doc-meta em {
  display: block;
  margin-top: 4px;
  color: #667085;
  font-style: normal;
  font-size: .62rem;
}

.bloom-live .live-doc-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: #0d2750;
  line-height: 1.2;
}

.live-doc-table {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(13, 39, 80, .08);
}

.live-doc-table-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px 110px;
  gap: 10px;
  padding: 10px 14px;
  background: #0d2750;
  color: rgba(255, 255, 255, .82);
  font-size: .52rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.bloom-live .live-doc-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px 110px;
  gap: 10px;
  align-items: center;
  padding: 14px;
  border: 0;
  background: #fff;
  color: #425066;
  font-size: .78rem;
}

.bloom-live .live-doc-line span:nth-child(2) {
  text-align: center;
  font-weight: 700;
  color: #0d2750;
}

.bloom-live .live-doc-line strong {
  text-align: right;
  font-size: .88rem;
  color: #0d2750;
  white-space: nowrap;
}

.bloom-live .live-doc-totals {
  margin-left: auto;
  width: min(260px, 100%);
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #f6f7f9;
}

.bloom-live .live-doc-totals div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: .72rem;
  color: #667085;
}

.bloom-live .live-doc-totals b {
  color: #0d2750;
  font-weight: 700;
}

.bloom-live .live-doc-totals .is-total {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 2px solid #0d2750;
  font-size: .95rem;
  font-weight: 800;
  color: #0d2750;
}

.bloom-live .live-doc-totals .is-total b {
  color: var(--orange-600);
  font-size: 1.05rem;
}

.live-doc-memo {
  margin: 0;
  color: #6b7280;
  font-size: .74rem;
  line-height: 1.55;
}

.live-doc-pay {
  margin: 0;
  color: var(--orange-600);
  font-size: .72rem;
  font-weight: 800;
}

.live-doc-clause {
  padding: 14px 16px;
  border-radius: 14px;
  background: #f6f7f9;
  border-left: 3px solid var(--orange-500);
}

.live-doc-clause p {
  margin: 0;
  color: #425066;
  font-size: .74rem;
  line-height: 1.55;
}

.bloom-live .live-doc-sign {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff7f2, #f4f1ea);
  border: 1px solid rgba(255, 107, 24, .18);
}

.bloom-live .live-doc-sign span {
  color: #667085;
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.bloom-live .live-doc-sign strong {
  color: var(--orange-500);
  font-size: .78rem;
  font-weight: 800;
}

.live-doc-signatures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.live-doc-sig {
  padding: 8px 10px;
  border-radius: 14px;
  background: #fafafa;
  border: 1px dashed rgba(13, 39, 80, .18);
}

.live-doc-sig span {
  display: block;
  margin-bottom: 6px;
  color: #8a93a3;
  font-size: .5rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.live-doc-sig-line {
  height: 1px;
  margin: 0 0 6px;
  background: rgba(13, 39, 80, .28);
}

.live-doc-sig em {
  color: #8a93a3;
  font-style: normal;
  font-size: .58rem;
}

.live-doc-bank {
  display: grid;
  grid-template-columns: 1.4fr .8fr;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(145deg, #0d2750, #16355f);
  color: #fff;
}

.live-doc-bank small {
  color: rgba(255, 255, 255, .55);
}

.live-doc-bank b {
  display: block;
  font-size: .82rem;
  font-weight: 700;
}

.live-doc-bank em {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, .72);
  font-style: normal;
  font-size: .62rem;
}

.live-doc-foot {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: #f0f2f5;
  border-top: 1px solid rgba(13, 39, 80, .08);
  color: #667085;
  font-size: .58rem;
  font-weight: 600;
}

.live-doc-foot strong {
  color: var(--orange-600);
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .04em;
}

/* Soft-UI base uses display:grid on .live-doc — keep bloom live docs as flex columns. */
.bloom-live .live-doc.live-doc-invoice,
.bloom-live .live-doc.live-doc-contract {
  display: flex !important;
  flex-direction: column;
  gap: 0;
  padding: 0 !important;
  height: 100%;
  min-height: 100%;
}

/* Editable premium invoice PDF */
.live-doc-invoice {
  color: #111d42;
  background: #fff;
}

.live-invoice-hero {
  position: relative;
  flex: 0 0 auto;
  min-height: 0;
  padding: 16px 18px 28px;
  color: #fff;
  background:
    radial-gradient(circle at 72% 15%, rgba(255, 255, 255, .14), transparent 30%),
    linear-gradient(125deg, #662b91 0%, #a13d88 45%, #f05a6b 100%);
  background-size: cover;
  background-position: center;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(110px, .75fr);
  grid-template-rows: auto auto;
  column-gap: 16px;
  row-gap: 12px;
  align-items: start;
}

.live-invoice-hero::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 20px;
  border-radius: 18px 18px 0 0;
  background: #fff;
  content: "";
}

.live-invoice-company {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  max-width: none;
}

.live-invoice-company > div:last-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.live-invoice-company strong {
  display: block;
  font-size: .88rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.live-invoice-company > div:last-child > span {
  display: block;
  font-size: .58rem;
  line-height: 1.35;
  opacity: .9;
  white-space: pre-line;
}

.live-invoice-company > div:last-child > span span {
  display: inline;
}

.live-invoice-logo {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #0d2750;
  background: #fff;
  box-shadow: 0 8px 22px rgba(13, 39, 80, .18);
  overflow: hidden;
}

.live-invoice-logo > span {
  font-size: 1.15rem;
  font-weight: 900;
}

.live-invoice-logo .live-doc-logo {
  width: 100%;
  height: 100%;
  border-radius: 0;
  box-shadow: none;
}

.live-invoice-logo:has(.live-doc-logo:not(.hidden)) > span {
  display: none;
}

.live-invoice-dates {
  position: static;
  width: auto;
  display: grid;
  justify-items: end;
  gap: 6px;
  text-align: right;
}

.live-invoice-dates > div {
  display: grid;
  gap: 1px;
  justify-items: end;
}

.live-invoice-dates span {
  margin-top: 0;
  font-size: .48rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .72;
}

.live-invoice-dates strong {
  font-size: .62rem;
  font-weight: 700;
}

.live-invoice-title {
  position: static;
  grid-column: 1 / -1;
  align-self: end;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
}

.live-invoice-title > div:first-child {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 4px;
}

.live-invoice-title h4 {
  margin: 0;
  font-size: clamp(1.8rem, 3.2vw, 2.65rem);
  line-height: .95;
  letter-spacing: -.04em;
}

.live-invoice-title span {
  font-size: .68rem;
  opacity: .9;
}

.live-invoice-to {
  flex: 0 1 44%;
  width: min(44%, 260px);
  min-width: 0;
  display: grid;
  justify-items: end;
  text-align: right;
}

.live-invoice-to small {
  margin-bottom: 4px;
  font-size: .48rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  opacity: .72;
}

.live-invoice-to pre {
  max-width: 100%;
  margin: 0 0 7px;
  color: #fff;
  font: 600 .62rem/1.35 var(--font-ui);
  white-space: pre-wrap;
}

.live-invoice-to b {
  font-size: .72rem;
  font-weight: 800;
}

.live-doc-invoice .live-doc-body {
  gap: 10px;
  padding: 12px 18px 14px;
  flex: 1 1 auto;
  display: flex !important;
  flex-direction: column;
  min-height: 0;
  background:
    linear-gradient(180deg, #fff 0%, #fff 62%, #fcf9fd 100%);
}

.live-doc-invoice .live-doc-table {
  border: 0;
  border-radius: 14px;
  overflow: visible;
}

.live-doc-invoice .live-doc-table-head,
.live-doc-invoice .live-doc-line {
  grid-template-columns: 42px minmax(0, 1fr) 90px 52px 100px;
}

.live-doc-invoice .live-doc-table-head {
  padding: 10px 12px;
  border-radius: 12px;
  color: #13234a;
  background: #e9ecf1;
}

.live-doc-invoice .live-doc-table-head span:nth-child(n+3) {
  text-align: right;
}

.soft-ui .bloom-live .live-doc-invoice .live-doc-line,
.bloom-live .live-doc-invoice .live-doc-line {
  margin-top: 7px;
  padding: 12px;
  border-top: 0;
  border-bottom: 0;
  border-radius: 12px;
  background: #f2f3f6;
}

.live-doc-invoice .live-doc-line > span:nth-child(1) {
  color: #64708a;
  font-weight: 800;
}

.live-doc-invoice .live-doc-line > .live-doc-description {
  text-align: left;
}

.live-doc-invoice .live-doc-line > span:nth-child(3),
.live-doc-invoice .live-doc-line > span:nth-child(4) {
  text-align: right;
  color: #14244a;
  font-size: .7rem;
}

.live-doc-description {
  display: grid;
  gap: 3px;
}

.live-doc-description b {
  color: #0d2750;
  font-size: .78rem;
}

.live-doc-description small {
  color: #8490a6;
  font-size: .55rem;
}

.live-invoice-notes {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 10px;
}

.live-invoice-notes > div {
  min-width: 0;
  padding: 10px 12px;
  border-left: 3px solid rgba(126, 47, 139, .55);
  border-radius: 0 10px 10px 0;
  background: #faf8fb;
}

.live-invoice-notes small {
  display: block;
  margin-bottom: 4px;
  color: #7d879a;
  font-size: .48rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.live-invoice-notes p {
  margin: 0;
  color: #253655;
  font-size: .6rem;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.live-invoice-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, .85fr);
  gap: 14px;
  align-items: end;
  flex: 0 0 auto;
  padding: 12px;
  border: 1px solid rgba(102, 43, 145, .08);
  border-radius: 12px;
  background: #faf8fb;
}

.live-invoice-thanks {
  display: grid;
  gap: 3px;
}

.live-invoice-thanks > strong {
  margin-bottom: 2px;
  color: #0d2750;
  font-size: .82rem;
}

.live-invoice-thanks > span {
  color: #7d879a;
  font-size: .56rem;
}

.live-invoice-thanks > small {
  margin-top: 12px;
  color: #0d2750;
  font-size: .55rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.live-invoice-thanks dl {
  margin: 3px 0 0;
  display: grid;
  gap: 3px 8px;
  font-size: .56rem;
}

.live-invoice-thanks dl > div {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 8px;
}

.live-invoice-thanks dt {
  color: #8a93a3;
}

.live-invoice-thanks dd {
  margin: 0;
  color: #243454;
  font-weight: 600;
}

.live-doc-invoice .live-doc-totals {
  width: 100%;
  padding: 0;
  background: transparent;
}

.live-doc-invoice .live-doc-totals .is-total {
  margin-top: 3px;
  padding: 11px 14px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(100deg, #662b91, #f05a6b);
  box-shadow: 0 10px 22px rgba(126, 47, 139, .2);
}

.live-doc-invoice .live-doc-totals .is-total b {
  color: #fff;
}

.live-doc-invoice .live-doc-pay {
  margin: 0;
  text-align: center;
}

.live-doc-invoice .live-doc-grow {
  display: block !important;
  flex: 1 1 auto;
  min-height: 48px;
}

/* Editable premium contract PDF (gradient Template 3 style) */
.live-doc-contract {
  color: #111d42;
  background: #f3f4f6;
}

.live-contract-hero {
  position: relative;
  flex: 0 0 auto;
  min-height: 0;
  padding: 16px 18px 28px;
  color: #fff;
  background:
    radial-gradient(circle at 78% 18%, rgba(255, 255, 255, .14), transparent 32%),
    linear-gradient(125deg, #662b91 0%, #a13d88 45%, #f05a6b 100%);
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.live-contract-hero::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 20px;
  border-radius: 18px 18px 0 0;
  background: #fff;
  content: "";
}

.live-contract-hero-top {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 16px;
  align-items: start;
}

.live-contract-brand {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.live-contract-logo {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #0d2750;
  background: #fff;
  box-shadow: 0 8px 22px rgba(13, 39, 80, .18);
  overflow: hidden;
}

.live-contract-logo > span {
  font-size: 1.15rem;
  font-weight: 900;
}

.live-contract-logo .live-doc-logo {
  width: 100%;
  height: 100%;
  border-radius: 0;
  box-shadow: none;
}

.live-contract-logo:has(.live-doc-logo:not(.hidden)) > span {
  display: none;
}

.live-contract-brand strong,
.live-contract-brand small {
  display: block;
}

.live-contract-brand strong {
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.live-contract-brand small {
  margin-top: 3px;
  opacity: .86;
  font-size: .55rem;
  line-height: 1.35;
}

.live-contract-meta {
  display: grid;
  gap: 6px;
  justify-items: end;
  text-align: right;
}

.live-contract-meta > div span {
  display: block;
  opacity: .75;
  font-size: .48rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.live-contract-meta strong {
  font-size: .68rem;
  font-weight: 700;
}

.live-contract-hero-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 14px;
}

.live-contract-hero-bottom h4 {
  margin: 0;
  font-size: 1.7rem;
  line-height: .95;
  letter-spacing: -.03em;
  font-weight: 900;
}

.live-contract-sub {
  margin: 8px 0 0;
  color: inherit;
  opacity: .9;
  font-size: .68rem;
  font-weight: 600;
  max-width: 280px;
}

.live-contract-total-due {
  margin: 0;
  color: inherit;
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
}

.live-doc-contract .live-doc-body {
  position: relative;
  z-index: 1;
  display: flex !important;
  flex-direction: column;
  gap: 10px;
  margin-top: -8px;
  padding: 12px 18px 14px;
  border-radius: 18px 18px 0 0;
  background: #fff;
  flex: 1 1 auto;
  min-height: 0;
}

.live-contract-section h5 {
  margin: 0 0 8px;
  color: #0d2750;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.live-contract-kicker {
  display: block;
  margin-bottom: 4px;
  color: #8490a6;
  font-size: .48rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.live-contract-parties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.live-contract-parties article,
.live-contract-service {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  background: #f8fafc;
}

.live-contract-parties pre,
.live-contract-service p {
  margin: 0;
  color: #243454;
  font: 600 .62rem/1.4 var(--font-ui);
  white-space: pre-wrap;
}

.live-contract-service small {
  display: block;
  margin-top: 6px;
  color: #8490a6;
  font-size: .55rem;
  line-height: 1.35;
}

.live-doc-contract .live-contract-fees {
  border: 0;
  border-radius: 14px;
  overflow: visible;
}

.live-doc-contract .live-contract-fees .live-doc-table-head,
.live-doc-contract .live-contract-fees .live-doc-line {
  grid-template-columns: 42px minmax(0, 1.1fr) 90px 90px 100px;
}

.live-doc-contract .live-contract-fees .live-doc-table-head {
  padding: 10px 12px;
  border-radius: 12px;
  color: #13234a;
  background: #e9ecf1;
}

.live-doc-contract .live-contract-fees .live-doc-table-head span:nth-child(n+3) {
  text-align: right;
}

.live-doc-contract .live-contract-fees .live-doc-line {
  margin-top: 7px;
  padding: 11px 12px;
  border-radius: 12px;
  background: #f2f3f6;
}

.live-doc-contract .live-contract-fees .live-doc-line > span:nth-child(1) {
  color: #64708a;
  font-weight: 800;
}

.live-doc-contract .live-contract-fees .live-doc-line > span:nth-child(n+3),
.live-doc-contract .live-contract-fees .live-doc-line > strong {
  text-align: right;
  color: #14244a;
  font-size: .68rem;
}

.live-contract-totals {
  width: min(100%, 260px);
  margin: 10px 0 0 auto;
  padding: 0;
  background: transparent;
  display: grid;
  gap: 6px;
}

.live-contract-totals div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 0 12px;
  color: #64708a;
  font-size: .62rem;
}

.live-contract-totals b {
  color: #0d2750;
  font-weight: 700;
  text-align: right;
}

.live-doc-contract .live-contract-totals .is-total {
  margin-top: 2px;
  padding: 11px 14px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(100deg, #662b91, #f05a6b);
  box-shadow: 0 10px 22px rgba(126, 47, 139, .2);
}

.live-doc-contract .live-contract-totals .is-total span,
.live-doc-contract .live-contract-totals .is-total b {
  color: #fff;
}

.live-doc-contract .live-doc-sign {
  margin-top: 4px;
}

.live-doc-contract .live-doc-signatures {
  flex: 0 0 auto;
  margin-top: 0;
}

.live-doc-contract .live-doc-sig {
  padding: 8px 10px;
  border: 1px solid #eef2f7;
  border-radius: 14px;
  background: #f8fafc;
}

.live-doc-contract .live-doc-sig-line {
  margin: 4px 0 6px;
  border-bottom: 1px dashed #cbd5e1;
  min-height: 0;
  height: 18px;
  background: transparent;
}

.live-doc-contract .live-doc-sig em {
  display: block;
  color: #0d2750;
  font-style: normal;
  font-size: .62rem;
  font-weight: 700;
}

.live-doc-contract .live-doc-sig small {
  display: block;
  margin-top: 2px;
  color: #8490a6;
  font-size: .5rem;
}

.live-doc-contract .live-doc-grow {
  display: block !important;
  flex: 1 1 auto;
  min-height: 48px;
}

.bloom-gate-modal {
  position: fixed;
  z-index: 200;
  inset: 0;
  padding: 20px;
  display: grid;
  place-items: center;
  background: rgba(6, 13, 26, .62);
  backdrop-filter: blur(4px);
}

.bloom-gate-dialog {
  width: min(480px, 100%);
  padding: 28px;
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow-raised);
}

.bloom-gate-dialog h3 {
  margin: 0 0 8px;
  color: var(--navy-950);
  font-family: var(--font-ui);
  font-size: 1.4rem;
  font-weight: 800;
}

.bloom-gate-dialog p {
  margin: 0 0 18px;
  color: var(--text-secondary);
  font-size: .8rem;
  line-height: 1.55;
}

.bloom-gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.bloom-gate-actions .button[disabled] {
  opacity: .55;
  cursor: not-allowed;
}

@media (max-width: 1200px) {
  .bloom-live-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

@media (max-width: 980px) {
  .bloom-meta-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bloom-live-layout { grid-template-columns: 1fr; }
  .bloom-live-side {
    order: -1;
    min-height: 0;
  }
  .bloom-preview-wrap {
    position: relative;
    top: auto;
    flex: none;
    min-height: 0;
  }
  .bloom-live .live-doc { min-height: 0; }
}

@media (max-width: 640px) {
  .bloom-live > .container { width: min(calc(100% - 20px), 1760px); }
  .bloom-panel { padding: 18px 16px; border-radius: 14px; }
  .bloom-meta-row,
  .bloom-address-row,
  .bloom-upload-row,
  .bloom-promo ul,
  .bloom-cta-row,
  .live-doc-signatures,
  .live-doc-bank,
  .bloom-live .live-doc-meta { grid-template-columns: 1fr; }
  .bloom-items-head,
  .bloom-item-row,
  .live-doc-table-head,
  .bloom-live .live-doc-line { grid-template-columns: 1fr; }
  .bloom-live .live-doc-line span:nth-child(2),
  .bloom-live .live-doc-line strong { text-align: left; }
  .bloom-cover-presets { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bloom-live .live-doc { min-height: 0; }
  .live-doc-body { padding: 18px 14px 14px; }
  .live-doc-foot { flex-direction: column; align-items: flex-start; }
  .live-invoice-hero {
    min-height: 250px;
    padding: 20px 18px 32px;
    grid-template-columns: minmax(0, 1fr) 104px;
    column-gap: 10px;
    row-gap: 14px;
  }
  .live-invoice-company { max-width: none; }
  .live-invoice-dates { width: auto; }
  .live-invoice-title {
    gap: 12px;
  }
  .live-invoice-title h4 { font-size: 1.65rem; }
  .live-invoice-to { width: 48%; }
  .live-doc-invoice { aspect-ratio: auto; }
  .live-doc-invoice .live-doc-body { padding: 18px 14px 20px; }
  .live-doc-invoice .live-doc-table-head,
  .live-doc-invoice .live-doc-line {
    grid-template-columns: 26px minmax(88px, 1fr) 62px 30px 72px;
    gap: 5px;
    font-size: .48rem;
  }
  .live-invoice-footer {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .live-invoice-notes { grid-template-columns: 1fr; }
  .live-contract-hero {
    min-height: 230px;
    padding: 18px 16px 30px;
  }
  .live-contract-hero-top,
  .live-contract-parties,
  .live-doc-contract .live-contract-fees .live-doc-table-head,
  .live-doc-contract .live-contract-fees .live-doc-line {
    grid-template-columns: 1fr;
  }
  .live-contract-meta { justify-items: start; text-align: left; }
  .live-contract-hero-bottom { flex-direction: column; align-items: flex-start; }
  .live-contract-hero-bottom h4 { font-size: 1.7rem; }
  .live-contract-total-due { white-space: normal; }
  .live-doc-contract { aspect-ratio: auto; }
  .live-doc-contract .live-doc-body { padding: 16px 14px 18px; }
  .live-contract-totals { width: 100%; }
}
