.zelle-invoice-app {
  --zi-bg: #050b13;
  --zi-panel: rgba(7, 17, 29, 0.82);
  --zi-panel-strong: rgba(11, 23, 39, 0.95);
  --zi-border: rgba(148, 163, 184, 0.18);
  --zi-blue: #1478ff;
  --zi-cyan: #58d7ff;
  --zi-muted: #9aa8bc;
  --zi-text: #f7fbff;
  background:
    radial-gradient(circle at 70% 10%, rgba(20, 120, 255, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(3, 8, 15, 0.98), rgba(5, 11, 19, 1));
  color: var(--zi-text);
  min-height: 70vh;
}

.zelle-invoice-app * {
  box-sizing: border-box;
}

.zelle-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.zelle-hero {
  padding: clamp(72px, 9vw, 116px) 0 36px;
}

.zelle-eyebrow {
  margin: 0 0 14px;
  color: #5fb7ff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.zelle-title {
  margin: 0;
  max-width: 860px;
  font-size: clamp(3.1rem, 7vw, 6rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.zelle-subtitle {
  margin: 22px 0 0;
  max-width: 760px;
  color: #cbd5e1;
  font-size: 1.06rem;
  line-height: 1.75;
}

.zelle-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  gap: 22px;
  align-items: start;
  padding: 0 0 84px;
}

.zelle-card {
  border: 1px solid var(--zi-border);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
    var(--zi-panel);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  overflow: hidden;
}

.zelle-card-inner {
  padding: clamp(20px, 3vw, 30px);
}

.zelle-card h2,
.zelle-card h3 {
  margin: 0;
  color: #fff;
  letter-spacing: -0.02em;
}

.zelle-card h2 {
  font-size: clamp(1.8rem, 3vw, 2.65rem);
}

.zelle-card h3 {
  font-size: 1.05rem;
}

.zelle-muted {
  color: var(--zi-muted);
}

.zelle-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.zelle-field {
  display: grid;
  gap: 8px;
}

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

.zelle-field > span,
.zelle-check span {
  color: #d9e5f5;
  font-size: 0.9rem;
  font-weight: 700;
}

.zelle-field input,
.zelle-field textarea,
.zelle-field select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  padding: 12px 13px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.zelle-field-error {
  display: none;
  color: #fecaca;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
}

.zelle-field.is-invalid input,
.zelle-field.is-invalid textarea,
.zelle-field.is-invalid select {
  border-color: rgba(248, 113, 113, 0.78);
  background: rgba(127, 29, 29, 0.18);
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.13);
}

.zelle-field.is-invalid .zelle-field-error,
.zelle-check.is-invalid .zelle-field-error {
  display: block;
}

.zelle-field input:focus,
.zelle-field textarea:focus,
.zelle-field select:focus {
  border-color: rgba(88, 215, 255, 0.65);
  box-shadow: 0 0 0 3px rgba(20, 120, 255, 0.16);
  background: rgba(0, 0, 0, 0.38);
}

.zelle-checks {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.zelle-check {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 11px;
  align-items: start;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  padding: 12px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.zelle-check.is-invalid {
  border-color: rgba(248, 113, 113, 0.68);
  background: rgba(127, 29, 29, 0.16);
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.1);
}

.zelle-check .zelle-field-error {
  grid-column: 2;
}

.zelle-check input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--zi-blue);
}

.zelle-summary {
  position: sticky;
  top: 96px;
}

.zelle-line {
  display: grid;
  grid-template-columns: 74px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.zelle-thumb {
  width: 74px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #030303;
  border: 1px solid rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 0 18px rgba(20, 120, 255, 0.08);
  overflow: hidden;
}

.zelle-line img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border: 0;
  border-radius: inherit;
  background: #030303;
  box-shadow: none;
  padding: 0;
}

.zelle-line strong {
  display: block;
  color: #fff;
  font-size: 0.96rem;
}

.zelle-line span,
.zelle-line p {
  color: var(--zi-muted);
  font-size: 0.82rem;
  margin: 3px 0 0;
}

.zelle-totals {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.zelle-total-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: #d7e2f1;
  font-size: 0.94rem;
}

.zelle-total-row--grand {
  margin-top: 6px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.22rem;
  font-weight: 800;
}

.zelle-alert {
  margin-top: 18px;
  border: 1px solid rgba(88, 215, 255, 0.24);
  border-radius: 12px;
  background: rgba(20, 120, 255, 0.09);
  color: #dff7ff;
  padding: 14px;
  font-size: 0.9rem;
  line-height: 1.55;
}

.zelle-error {
  display: none;
  margin-top: 18px;
  border: 1px solid rgba(248, 113, 113, 0.34);
  border-radius: 12px;
  background: rgba(127, 29, 29, 0.22);
  color: #fecaca;
  padding: 14px;
  font-size: 0.9rem;
  line-height: 1.55;
}

.zelle-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.zelle-invoice-actions {
  margin-bottom: clamp(28px, 4vw, 40px);
}

.zelle-btn {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 0 18px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.zelle-btn-primary {
  background: linear-gradient(135deg, #0a84ff, #326bff);
  color: #fff;
  box-shadow: 0 14px 36px rgba(20, 120, 255, 0.28);
}

.zelle-btn-secondary {
  border-color: rgba(148, 163, 184, 0.25);
  background: rgba(255, 255, 255, 0.035);
  color: #fff;
}

.zelle-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.zelle-empty {
  padding: 40px;
  text-align: center;
}

.zelle-invoice {
  display: none;
  padding: 0 0 84px;
}

.zelle-invoice-card {
  background: #ffffff;
  color: #0f172a;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
}

.zelle-invoice-actions + .zelle-invoice-card {
  margin-top: 0;
}

.zelle-invoice-head {
  display: flex;
  justify-content: space-between;
  gap: 26px;
  background: #050505;
  color: #fff;
  padding: 28px;
}

.zelle-invoice-head img {
  width: 176px;
  height: auto;
}

.zelle-status {
  display: inline-flex;
  margin-top: 10px;
  border: 1px solid rgba(20, 120, 255, 0.35);
  border-radius: 999px;
  background: rgba(20, 120, 255, 0.12);
  color: #b9dcff;
  padding: 7px 12px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.zelle-invoice-body {
  padding: 30px;
  color: #0f172a;
}

.zelle-invoice-body h2,
.zelle-invoice-body h3,
.zelle-invoice-body strong {
  color: #0f172a;
}

.zelle-invoice-body p,
.zelle-invoice-body span,
.zelle-invoice td {
  color: #334155;
}

.zelle-invoice-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 26px;
}

.zelle-invoice table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 10px;
}

.zelle-invoice th {
  background: #eaf2ff;
  color: #213047;
  text-align: left;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.zelle-invoice th,
.zelle-invoice td {
  border-bottom: 1px solid #dce5f2;
  padding: 12px;
  vertical-align: top;
}

.zelle-invoice .num {
  text-align: right;
}

.zelle-invoice .zelle-totals {
  background: #f8fafc;
  border: 1px solid #dbe5f0;
  border-radius: 12px;
  padding: 16px;
}

.zelle-invoice .zelle-total-row {
  color: #334155;
}

.zelle-invoice .zelle-total-row span {
  color: #475569;
}

.zelle-invoice .zelle-total-row strong {
  color: #0f172a;
}

.zelle-invoice .zelle-total-row--grand {
  border-top-color: #cbd5e1;
  color: #0f172a;
}

.zelle-invoice .zelle-total-row--grand span,
.zelle-invoice .zelle-total-row--grand strong {
  color: #020617;
}

.zelle-total-row--discount span,
.zelle-total-row--discount strong {
  color: #075985 !important;
}

.zelle-discount-box {
  display: grid;
  gap: 10px;
  margin-top: 20px;
  border: 1px solid rgba(88, 215, 255, 0.18);
  border-radius: 12px;
  background: rgba(20, 120, 255, 0.07);
  padding: 14px;
}

.zelle-discount-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.zelle-discount-message {
  min-height: 18px;
  color: #b9dcff;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.45;
}

.zelle-discount-message.is-error {
  color: #fecaca;
}

.zelle-discount-message.is-success {
  color: #dcfce7;
}

.zelle-payment-box {
  margin-top: 24px;
  border-left: 4px solid #0047d8;
  background: #eef5ff;
  color: #0f172a;
  padding: 18px;
  line-height: 1.65;
}

.zelle-payment-box strong {
  color: #0f172a;
}

.zelle-confirm-note {
  margin-top: 18px;
  border-radius: 12px;
  background: rgba(20, 120, 255, 0.1);
  color: #dff7ff;
  padding: 16px;
  line-height: 1.65;
}

.zelle-internal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  gap: 22px;
  align-items: start;
  padding: 0 0 84px;
}

.zelle-internal-lines {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.zelle-builder-line {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 86px 110px;
  gap: 10px;
  align-items: end;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  padding: 12px;
}

.zelle-builder-line button {
  grid-column: 1 / -1;
  justify-self: start;
}

.zelle-builder-totals {
  margin-top: 18px;
  border: 1px solid rgba(88, 215, 255, 0.18);
  border-radius: 12px;
  background: rgba(20, 120, 255, 0.07);
  padding: 16px;
}

.zelle-secure-note {
  margin-top: 16px;
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 12px;
  background: rgba(22, 101, 52, 0.16);
  color: #dcfce7;
  padding: 14px;
  line-height: 1.6;
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .zelle-grid,
  .zelle-internal-grid,
  .zelle-invoice-meta {
    grid-template-columns: 1fr;
  }

  .zelle-summary {
    position: static;
  }

  .zelle-form-grid {
    grid-template-columns: 1fr;
  }

  .zelle-builder-line {
    grid-template-columns: 1fr;
  }
}

@media print {
  @page {
    margin: 0.42in;
  }

  html,
  body {
    width: auto !important;
    height: auto !important;
    background: #ffffff !important;
  }

  body * {
    visibility: hidden !important;
  }

  .zelle-invoice,
  .zelle-invoice *,
  .zelle-wrap,
  .zelle-invoice-card,
  .zelle-invoice-card * {
    visibility: visible !important;
  }

  .site-header,
  .site-footer,
  .ruo-topline,
  .zelle-confirm-note,
  .zelle-actions,
  .zelle-invoice-actions,
  .zelle-hero,
  .zelle-grid {
    display: none !important;
  }

  main,
  .zelle-invoice-app,
  #zelle-invoice-result,
  #special-invoice-result,
  .zelle-invoice,
  .zelle-wrap {
    display: block !important;
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    color: #0f172a !important;
    overflow: visible !important;
  }

  #zelle-invoice-result,
  #special-invoice-result {
    position: absolute !important;
    inset: 0 0 auto 0 !important;
  }

  .zelle-invoice-card {
    position: static !important;
    width: 100% !important;
    max-width: none !important;
    box-shadow: none;
    border-radius: 14px;
    overflow: hidden;
    break-inside: avoid;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .zelle-invoice-head,
  .zelle-status,
  .zelle-invoice th,
  .zelle-invoice .zelle-totals,
  .zelle-payment-box {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .zelle-invoice-head {
    background: #050505 !important;
    color: #ffffff !important;
  }

  .zelle-payment-box {
    background: #eef5ff !important;
  }

  .zelle-invoice .zelle-totals {
    background: #f8fafc !important;
  }
}
