/* =========================================================
   Precision Invoice Generator
   Scoped CSS only inside #pi-invoice-app
   ========================================================= */

.page-id-21370 .enatega-sidebar {
  display: none !important;
}

#pi-invoice-app .pi-panel input {
  margin: 0 0 10px;
}

#pi-invoice-app {
  --pi-bg: #f7f8ff;
  --pi-surface: #ffffff;
  --pi-panel: #f3f5ff;
  --pi-input: #eef1ff;
  --pi-border: #d0d6ea;
  --pi-text: #1d2433;
  --pi-muted: #70768a;
  --pi-primary: #4d49d3;
  --pi-accent: #7ae8b2;
  --pi-danger: #ea8f97;
  --pi-shadow: 0 24px 48px -18px rgba(25, 35, 60, 0.12);
  --pi-shadow-soft: 0 10px 24px rgba(25, 35, 60, 0.06);

  width: 100%;
  background: var(--pi-bg);
  color: var(--pi-text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
  color-scheme: light;
  border-radius: 18px;
}

#pi-invoice-app .pi-hidden,
#pi-invoice-app .is-hidden {
  display: none !important;
}

/* Layout */
#pi-invoice-app .pi-shell {
  width: auto;
  padding: 28px 24px 40px;
}

#pi-invoice-app .pi-layout {
  max-width: 1420px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 44px;
  align-items: start;
}

#pi-invoice-app .pi-editor,
#pi-invoice-app .pi-preview-wrap {
  min-width: 0;
}

/* Top section */
#pi-invoice-app .pi-top-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 44px;
  align-items: start;
  margin-bottom: 36px;
}

#pi-invoice-app .pi-stack {
  display: grid;
  gap: 26px;
  align-content: start;
}

/* Labels */
#pi-invoice-app .pi-label,
#pi-invoice-app .pi-section-title {
  display: block;
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  color: #23293a;
}

#pi-invoice-app .pi-section-title {
  margin-bottom: 18px;
  color: #25304a;
}

#pi-invoice-app .pi-section-title--muted {
  color: #313646;
}

/* Upload */
#pi-invoice-app .pi-upload {
  position: relative;
  width: 100%;
  height: 238px;
  border: 2px dashed #cbd1e4;
  border-radius: 22px;
  background: #f6f7ff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

#pi-invoice-app .pi-upload:hover {
  border-color: rgba(77, 73, 211, 0.45);
  background: #f3f5ff;
  box-shadow: var(--pi-shadow-soft);
}

#pi-invoice-app .pi-upload__icon {
  font-size: 52px;
  line-height: 1;
  color: rgba(94, 103, 123, 0.78);
  margin-bottom: 10px;
}

#pi-invoice-app .pi-upload__text {
  font-size: 17px;
  line-height: 1.2;
  font-weight: 500;
  color: #4a5162;
}

#pi-invoice-app .pi-upload__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.14;
  pointer-events: none;
}

/* Inputs */
#pi-invoice-app .pi-input,
#pi-invoice-app .pi-textarea {
  width: stretch;
  border: none;
  outline: none;
  background: var(--pi-input);
  color: var(--pi-text);
  border-radius: 16px;
  padding: 16px 18px;
  font-size: 15px;
  line-height: 1.35;
  appearance: none;
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

#pi-invoice-app .pi-input::placeholder,
#pi-invoice-app .pi-textarea::placeholder {
  color: #70778d;
}

#pi-invoice-app .pi-input:focus,
#pi-invoice-app .pi-textarea:focus {
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(77, 73, 211, 0.16);
}

#pi-invoice-app input[type="date"].pi-input {
  padding-right: 16px;
}

#pi-invoice-app input[type="date"].pi-input::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.8;
}

#pi-invoice-app input[type="number"].pi-input::-webkit-outer-spin-button,
#pi-invoice-app input[type="number"].pi-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

#pi-invoice-app .pi-textarea {
  min-height: 124px;
  resize: none;
}

#pi-invoice-app .pi-textarea--large {
  min-height: 196px;
}

/* Panels */
#pi-invoice-app .pi-panel {
  background: #f4f6ff;
  border-radius: 22px;
  padding: 28px;
  margin-bottom: 36px;
}

#pi-invoice-app .pi-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

/* Line items */
#pi-invoice-app .pi-items-area {
  margin-bottom: 42px;
}

#pi-invoice-app .pi-items-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

#pi-invoice-app .pi-items-head__meta {
  display: flex;
  justify-content: flex-end;
  gap: 56px;
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #6a7083;
  padding-right: 10px;
}

label.pi-label-mobile {
    display: none;
}

#pi-invoice-app .pi-items-head__meta span {
  min-width: 90px;
  text-align: right;
}

#pi-invoice-app .pi-items-list {
  display: grid;
  gap: 22px;
  margin-top: 18px;
}

#pi-invoice-app .pi-item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 98px 132px 44px;
  gap: 45px;
  align-items: center;
}

#pi-invoice-app .pi-item-row .pi-input {
  height: 54px;
  padding: 0 16px;
  border-radius: 14px;
  background: var(--pi-input);
}

#pi-invoice-app .pi-item-row .pi-desc {
  background: #eef1ff;
  padding-left: 16px;
  padding-right: 16px;
  font-size: 16px;
  color: #101423;
}

span.pi-input-group.pi-input-group--discount {
  display: flex;
  align-items: center;
}

#pi-invoice-app .pi-item-row .pi-qty {
  text-align: center;
}

#pi-invoice-app .pi-item-row .pi-price {
  text-align: right;
  font-weight: 700;
  font-size: 16px;
}

#pi-invoice-app .pi-remove {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--pi-danger);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, color 0.15s ease;
}

#pi-invoice-app .pi-remove:hover {
  background: rgba(234, 143, 151, 0.12);
  color: #d86f7a;
  transform: translateY(-1px);
}

/* Buttons */
#pi-invoice-app .pi-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

#pi-invoice-app .pi-btn:active {
  transform: scale(0.985);
}

#pi-invoice-app .pi-btn__icon {
  font-size: 18px;
  line-height: 1;
}

#pi-invoice-app .pi-btn--dashed {
  margin-top: 10px;
  height: 58px;
  padding: 0 22px;
  border-radius: 16px;
  border: 2px dashed #c4c5dd;
  background: transparent;
  color: var(--pi-primary);
  font-size: 15px;
  font-weight: 600;
}

#pi-invoice-app .pi-btn--dashed:hover {
  border-color: rgba(77, 73, 211, 0.45);
  background: rgba(77, 73, 211, 0.03);
}

#pi-invoice-app .pi-btn--soft {
  height: 42px;
  padding: 0 18px;
  border-radius: 12px;
  background: #e4e9fb;
  color: #4d49d3;
  font-size: 13px;
  font-weight: 700;
}

#pi-invoice-app .pi-btn--soft:hover {
  background: #dce3fb;
}

#pi-invoice-app .pi-btn--primary {
  height: 42px;
  padding: 0 18px;
  border-radius: 12px;
  background: linear-gradient(180deg, #4d49d3 0%, #3f45cc 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 14px 24px rgba(77, 73, 211, 0.22);
}

#pi-invoice-app .pi-btn--action {
  flex: 1 1 0;
  height: 58px;
  padding: 0 18px;
  border-radius: 16px;
  background: #dfe4f9;
  color: #2f3550;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  box-shadow: 0 10px 18px rgba(77, 73, 211, 0.09);
  padding: 14px 18px;
}

#pi-invoice-app .pi-btn--action:hover {
  background: #d8def7;
}

/* Preview */
#pi-invoice-app .pi-preview-wrap {
  position: sticky;
  top: 24px;
  align-self: start;
}

#pi-invoice-app .pi-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

#pi-invoice-app .pi-preview-head__title {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #13192a;
}

#pi-invoice-app .pi-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--pi-accent);
  color: #18563d;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#pi-invoice-app .pi-preview-paper {
  background: #fff;
  border-radius: 20px;
  padding: 38px 40px 34px;
  box-shadow: var(--pi-shadow);
  min-height: 640px;
}

span.aie-card__icon img {
    width: 28px;
}

#pi-invoice-app .pi-invoice-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 50px;
}

#pi-invoice-app .pi-logo-badge {
  width: 120px;
  height: auto;
  border-radius: 12px;
  /* background: #5148dc; */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: 0 0 auto;
}

.pi-upload__icon.is-hidden {
  display: none !important;
}

#pi-invoice-app .pi-logo-badge__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#pi-invoice-app .pi-logo-badge__icon {
  color: #ffffff;
  font-size: 24px;
  line-height: 1;
}

#pi-invoice-app .pi-invoice-title {
  text-align: right;
}

#pi-invoice-app .pi-invoice-title h1 {
  margin: 0;
  font-size: 34px;
  line-height: 0.95;
  letter-spacing: -0.055em;
  font-weight: 900;
  color: #111827;
}

#pi-invoice-app .pi-invoice-title p {
  margin: 10px 0 0;
  font-size: 15px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #3647d8;
}

#pi-invoice-app .pi-address-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 46px;
}

#pi-invoice-app .pi-address--right {
  text-align: right;
}

#pi-invoice-app .pi-kicker {
  margin: 0 0 7px;
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #7c8197;
}

#pi-invoice-app .pi-address__name {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 800;
  color: #151b2a;
}

#pi-invoice-app .pi-address__text {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: #555d6f;
}

#pi-invoice-app .pi-preview-items-wrap {
  margin-bottom: 40px;
}

#pi-invoice-app .pi-preview-table-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 70px 110px;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 18px;
  border-bottom: 1px solid #dbe2f2;
}

#pi-invoice-app .pi-preview-table-head span {
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #70758c;
}

#pi-invoice-app .pi-preview-table-head__qty,
#pi-invoice-app .pi-preview-table-head__total {
  text-align: right;
}

#pi-invoice-app .pi-preview-items {
  display: grid;
  gap: 16px;
}

#pi-invoice-app .pi-preview-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 70px 110px;
  gap: 12px;
  align-items: start;
}

#pi-invoice-app .pi-preview-row span {
  font-size: 15px;
  line-height: 1.5;
  color: #111827;
}

#pi-invoice-app .pi-preview-row span:nth-child(2) {
  text-align: right;
  color: #51586a;
}

#pi-invoice-app .pi-preview-row span:nth-child(3) {
  text-align: right;
  font-weight: 800;
}

#pi-invoice-app .pi-total-box {
  background: #eff2ff;
  border-radius: 18px;
  padding: 24px 24px 22px;
}

#pi-invoice-app .pi-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

#pi-invoice-app .pi-total-row__label {
  font-size: 14px;
  line-height: 1.35;
  color: #1f2531;
}

#pi-invoice-app .pi-total-row__value {
  font-size: 14px;
  line-height: 1.35;
  color: #111827;
  font-weight: 500;
}

#pi-invoice-app .pi-divider {
  height: 1px;
  background: rgba(148, 163, 184, 0.18);
  margin: 16px 0 18px;
}

#pi-invoice-app .pi-total-final {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

#pi-invoice-app .pi-total-final__label {
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #3840d6;
}

#pi-invoice-app .pi-total-final__value {
  font-size: 32px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.05em;
  color: #111827;
}

#pi-invoice-app .pi-preview-note {
  margin-top: 42px;
  text-align: center;
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #bcc1d7;
}

#pi-invoice-app .pi-preview-actions {
  display: flex;
  gap: 16px;
  margin-top: 26px;
}

/* ================= INVOICE PDF STYLES ================= */

.invoice-container {
  max-width: 900px;
  margin: 0 auto;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* ================= HEADER ================= */

.invoice-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 40px;
  border-bottom: 2px solid #f0f0f0;
}

.invoice-header__left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.invoice-logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.invoice-logo-placeholder {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 32px;
}

.invoice-title {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #1a1a1a;
}

.btn-download-pdf {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: underline;
}

.btn-download-pdf:hover {
  background: #5568d3;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* ================= MAIN CONTENT ================= */

.invoice-main {
  padding: 40px;
}

.invoice-title-section {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e5e5e5;
}

.invoice-title-section h2 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #1a1a1a;
}

.invoice-number {
  font-size: 18px;
  font-weight: 700;
  color: #667eea;
}

.invoice-dates {
  text-align: right;
}

.date-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
}

.date-label {
  font-size: 12px;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.date-value {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
}

/* ================= ADDRESSES ================= */

.invoice-addresses {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.address-block {
  border-left: 3px solid #667eea;
  padding-left: 20px;
}

.address-title {
  font-size: 12px;
  font-weight: 700;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.address-name {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 8px;
}

.address-text {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  white-space: pre-wrap;
}

/* ================= ITEMS TABLE ================= */

.invoice-items {
  margin-bottom: 40px;
}

.items-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  overflow: hidden;
}

.items-table thead {
  background: #f9f9f9;
  border-bottom: 2px solid #e5e5e5;
}

.items-table th {
  padding: 16px 20px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.items-table tbody tr {
  border-bottom: 1px solid #f0f0f0;
}

.items-table tbody tr:last-child {
  border-bottom: none;
}

.items-table td {
  padding: 20px;
  font-size: 14px;
  color: #333;
}

.col-desc {
  width: 45%;
}

.col-qty {
  width: 15%;
  text-align: center;
}

.col-price {
  width: 20%;
  text-align: right;
}

.col-total {
  width: 20%;
  text-align: right;
  font-weight: 600;
  color: #1a1a1a;
}

.items-table tr:hover {
  background: #fafafa;
}

/* ================= TOTALS ================= */

.invoice-totals {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  margin-bottom: 40px;
}

.totals-left {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.notes-section,
.terms-section {
  border-top: 1px solid #e5e5e5;
  padding-top: 20px;
}

.notes-section h4,
.terms-section h4 {
  font-size: 12px;
  font-weight: 700;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.notes-section p,
.terms-section p {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
  white-space: pre-wrap;
}

.totals-right {
  background: #f9f9f9;
  padding: 24px;
  border-radius: 8px;
}

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.total-label {
  font-size: 13px;
  color: #666;
}

.total-label span {
  font-size: 12px;
  color: #999;
}

.total-value {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
}

.discount-row {
  color: #d9534f;
}

.discount-value {
  color: #d9534f;
}

.total-divider {
  height: 2px;
  background: #ddd;
  margin: 16px 0;
}

.amount-due {
  margin-bottom: 0;
}

.amount-due .total-label {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
}

.amount-due .total-value {
  font-size: 20px;
  font-weight: 700;
  color: #667eea;
}

/* ================= FOOTER ================= */

.invoice-footer {
  text-align: center;
  padding: 24px;
  background: #f9f9f9;
  border-top: 1px solid #e5e5e5;
  font-size: 12px;
  color: #999;
  line-height: 1.8;
}

/* ================= PRINT STYLES ================= */

.no-print {
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}

@media print {
  body {
    background: white;
    padding: 0;
  }

  .invoice-container {
    max-width: 100%;
    border-radius: 0;
    box-shadow: none;
  }

  .no-print {
    display: none !important;
  }

  .invoice-header {
    border-bottom: 2px solid #000;
  }

  .invoice-main {
    padding: 30px;
  }
}

/* ================= RESPONSIVE ================= */

@media (max-width: 768px) {
  .invoice-header {
    flex-direction: column;
    gap: 20px;
  }

  .invoice-addresses {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .invoice-totals {
    grid-template-columns: 1fr;
  }

  .totals-left {
    grid-template-columns: 1fr;
  }

  .items-table {
    font-size: 12px;
  }

  .items-table td,
  .items-table th {
    padding: 12px;
  }

  .col-desc {
    width: 40%;
  }

  .col-qty {
    width: 20%;
  }

  .col-price {
    width: 20%;
  }

  .col-total {
    width: 20%;
  }
}


/* Print */
/* =========================
   PRINT / PDF STYLES
========================= */
@media print {

  .page-id-21370 .header-auth {
    display: none !important;
  }

  .page-id-21370.gt-selected {
    display: none !important;
  }

  .page-id-21370 .enatega-chat-widget {
    display: none !important;
  }

  .page-id-21370.enatega-plugin-footer {
    display: none !important;
  }

  @page {
    size: A4;
    margin: 20mm;
  }

  /* RESET EVERYTHING */
  * {
    box-sizing: border-box;
  }

  #pi-invoice-app {
    font-family: Inter, Arial, sans-serif;
    color: #111;
    font-size: 12px;
    line-height: 1.4;
  }

  /* HIDE NON-INVOICE */
  .pi-editor,
  .pi-preview-head,
  .pi-preview-actions,
  .header-auth,
  .enatega-chat-widget,
  .enatega-plugin-footer {
    display: none !important;
  }

  .pi-layout {
    display: block !important;
  }

  .pi-preview-paper {
    width: 100%;
  }

  /* HEADER */
  .pi-invoice-top {
    display: table;
    width: 100%;
    margin-bottom: 25px;
  }

  .pi-logo-badge {
    display: table-cell;
    width: 60px;
    vertical-align: top;
  }

  .pi-invoice-title {
    display: table-cell;
    text-align: right;
    vertical-align: top;
  }

  .pi-invoice-title h1 {
    font-size: 28px;
    font-weight: 800;
    margin: 0;
  }

  .pi-invoice-title p {
    font-size: 12px;
    color: #555;
  }

  /* ADDRESS */
  .pi-address-grid {
    display: table;
    width: 100%;
    margin-bottom: 25px;
  }

  .pi-address {
    display: table-cell;
    width: 50%;
    vertical-align: top;
  }

  .pi-address--right {
    text-align: right;
  }

  .pi-kicker {
    font-size: 10px;
    text-transform: uppercase;
    color: #777;
    margin-bottom: 6px;
    letter-spacing: 1px;
  }

  .pi-address__name {
    font-weight: 600;
  }

  .pi-address__text {
    color: #333;
    white-space: normal;
    /* FIX TEXT BREAK */
  }

  /* TABLE HEADER */
  .pi-preview-table-head {
    display: table;
    width: 100%;
    border-bottom: 2px solid #000;
    margin-bottom: 10px;
    padding-bottom: 5px;
    font-size: 11px;
    font-weight: 600;
  }

  .pi-preview-table-head span {
    display: table-cell;
  }

  .pi-preview-table-head__desc {
    width: 60%;
  }

  .pi-preview-table-head__qty {
    width: 15%;
    text-align: right;
  }

  .pi-preview-table-head__total {
    width: 25%;
    text-align: right;
  }

  /* ROWS */
  .pi-preview-row {
    display: table;
    width: 100%;
    border-bottom: 1px solid #eee;
    padding: 6px 0;
  }

  .pi-preview-row span {
    display: table-cell;
    vertical-align: top;
  }

  .pi-preview-row__desc {
    width: 60%;
  }

  .pi-preview-row__qty {
    width: 15%;
    text-align: right;
  }

  .pi-preview-row__total {
    width: 25%;
    text-align: right;
    font-weight: 600;
  }

  /* TOTAL BOX */
  .pi-total-box {
    margin-top: 25px;
    width: 280px;
    margin-left: auto;
  }

  .pi-total-row {
    display: table;
    width: 100%;
    margin-bottom: 6px;
  }

  .pi-total-row span {
    display: table-cell;
  }

  .pi-total-row__label {
    text-align: left;
    color: #555;
  }

  .pi-total-row__value {
    text-align: right;
    font-weight: 600;
  }

  .pi-divider {
    height: 1px;
    background: #000;
    margin: 10px 0;
  }

  .pi-total-final {
    display: table;
    width: 100%;
  }

  .pi-total-final span {
    display: table-cell;
  }

  .pi-total-final__label {
    font-size: 11px;
    font-weight: 700;
  }

  .pi-total-final__value {
    text-align: right;
    font-size: 20px;
    font-weight: 800;
    white-space: nowrap;
    /* FIX BREAK */
  }

  /* FOOTER */
  .pi-preview-note {
    margin-top: 40px;
    text-align: center;
    font-size: 10px;
    color: #777;
  }

}

/* Responsive */
@media (max-width: 1240px) {
  #pi-invoice-app .pi-layout {
    grid-template-columns: 1fr 390px;
    gap: 34px;
  }

  #pi-invoice-app .pi-top-grid {
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 34px;
  }
}

@media (max-width: 1100px) {
  #pi-invoice-app .pi-layout {
    grid-template-columns: 1fr;
  }

  #pi-invoice-app .pi-preview-wrap {
    position: static;
  }

  #pi-invoice-app .pi-preview-paper {
    max-width: 720px;
  }
}

@media (max-width: 900px) {
  #pi-invoice-app .pi-top-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  #pi-invoice-app .pi-upload {
    width: 100%;
    max-width: 320px;
  }

  #pi-invoice-app .pi-preview-paper {
    padding: 30px 24px 26px;
  }
}

@media (max-width: 700px) {
  #pi-invoice-app .pi-shell {
    padding: 18px 14px 24px;
  }

  #pi-invoice-app .pi-panel {
    padding: 20px;
  }

  #pi-invoice-app .pi-two-col,
  #pi-invoice-app .pi-address-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  #pi-invoice-app .pi-address--right {
    text-align: left;
  }

  #pi-invoice-app .pi-item-row,
  #pi-invoice-app .pi-preview-table-head,
  #pi-invoice-app .pi-preview-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  #pi-invoice-app .pi-item-row .pi-desc {
    padding-left: 16px;
    background: var(--pi-input);
    border-radius: 14px;
  }

  #pi-invoice-app .pi-item-row .pi-qty,
  #pi-invoice-app .pi-item-row .pi-price {
    text-align: left;
  }

  #pi-invoice-app .pi-items-head__meta,
  #pi-invoice-app .pi-preview-table-head {
    display: none;
  }

  #pi-invoice-app .pi-total-final__value {
    font-size: 26px;
  }

  #pi-invoice-app .pi-preview-actions {
    flex-direction: column;
  }
}

@media (max-width: 520px) {

  label.pi-label-mobile {
    display: block;
  }

  #pi-invoice-app .pi-invoice-title h1 {
    font-size: 28px;
  }

  #pi-invoice-app .pi-upload {
    height: 200px;
  }

  #pi-invoice-app .pi-label,
  #pi-invoice-app .pi-section-title {
    font-size: 13px;
  }

  #pi-invoice-app .pi-input,
  #pi-invoice-app .pi-textarea {
    padding: 14px 14px;
    font-size: 14px;
    border-radius: 14px;
  }
  .nx-ai-right-inner>h3 {
    font-size: 20px;
  }

  .ai-cost-estimator-root h2,
  .ai-estimator-root h2,
  .aie-page h2 {
    font-size: 24px;
  }
}