:root{
  --ipdf-template-doc-accent: var(--ipdf-template-accent, #6d28d9);
  --ipdf-template-doc-accent-rgb: var(--ipdf-template-accent-rgb, 109, 40, 217);
  --ipdf-template-doc-accent-soft: rgba(109, 40, 217, 0.06);
  --ipdf-template-doc-text: #1A1A1A;
  --ipdf-template-doc-muted: #6B7280;
  --ipdf-template-doc-faint: #9CA3AF;
  --ipdf-template-doc-border: #E5E7EB;
  --ipdf-template-doc-bg-soft: #FAFAFA;
}

.ipdf-template-doc{
  position: relative;
  color: #1A1A1A;
  background: #FFFFFF;
  border-radius: 2px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 13px;
  line-height: 1.7;
  padding-inline-start: 18px;
}

.ipdf-template-doc *{
  box-sizing: border-box;
}

.ipdf-template-doc__accent-rule{
  position: absolute;
  left: 0;
  top: 48px;
  bottom: 48px;
  width: 3px;
  background: var(--ipdf-template-doc-accent, #6d28d9);
  border-radius: 0 2px 2px 0;
}

.ipdf-template-doc[dir="rtl"]{
  text-align: right;
  padding-inline-start: 0;
  padding-inline-end: 18px;
}

.ipdf-template-doc[dir="rtl"] .ipdf-template-doc__accent-rule{
  left: auto;
  right: 0;
  border-radius: 2px 0 0 2px;
}

.ipdf-template-doc__block{
  margin: 0 0 18px;
  break-inside: avoid;
}

.ipdf-template-doc__block--header{
  margin-bottom: 0;
}

.ipdf-template-doc__block--section-title{
  margin-bottom: 12px;
}

.ipdf-template-doc__header{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid #E5E7EB;
}

.ipdf-template-doc__header-copy{
  min-width: 0;
}

.ipdf-template-doc__eyebrow{
  margin: 0 0 8px;
  color: var(--ipdf-template-doc-accent, #6d28d9);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.ipdf-template-doc__title{
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  color: #1A1A1A;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.ipdf-template-doc__subtitle{
  margin-top: 6px;
  font-size: 14px;
  color: #6B7280;
  line-height: 1.45;
  font-weight: 400;
}

.ipdf-template-doc__meta-stack{
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 10px;
  color: #9CA3AF;
  font-size: 12px;
  line-height: 1.35;
}

.ipdf-template-doc--resume .ipdf-template-doc__title{
  font-size: 28px;
}

.ipdf-template-doc--resume .ipdf-template-doc__subtitle{
  color: var(--ipdf-template-doc-accent, #6d28d9);
  font-size: 15px;
  font-weight: 500;
}

.ipdf-template-doc--resume .ipdf-template-doc__meta-stack{
  gap: 6px 16px;
  font-size: 12px;
}

.ipdf-template-doc__header-side{
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 12px;
  flex: 0 0 auto;
  text-align: right;
}

.ipdf-template-doc__header-media{
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}

.ipdf-template-doc__meta-right{
  font-size: 12px;
  line-height: 1.45;
  color: #9CA3AF;
}

.ipdf-template-doc__meta-right strong{
  display: block;
  margin-bottom: 2px;
  font-size: 13px;
  font-weight: 600;
  color: #1A1A1A;
}

.ipdf-template-doc__logo{
  display: block;
  max-width: 140px;
  max-height: 58px;
  object-fit: contain;
}

.ipdf-template-doc__profile-photo{
  display: block;
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #E5E7EB;
  background: #FAFAFA;
}

.ipdf-template-doc__profile-photo-placeholder{
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid #E5E7EB;
  background: rgba(0, 0, 0, 0.03);
  color: #9CA3AF;
  font-size: 11px;
  line-height: 1;
}

.ipdf-template-doc__section{
  margin-bottom: 0;
}

.ipdf-template-doc__section-title{
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ipdf-template-doc-accent, #6d28d9);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #E5E7EB;
}

.ipdf-template-doc__section-title::before{
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 2px;
  background: var(--ipdf-template-doc-accent, #6d28d9);
  opacity: 0.4;
}

.ipdf-template-doc__body,
.ipdf-template-doc__paragraph{
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: #6B7280;
}

.ipdf-template-doc__list{
  margin: 0;
  padding-inline-start: 20px;
  font-size: 13px;
  line-height: 1.7;
  color: #6B7280;
}

.ipdf-template-doc__list li{
  margin: 0 0 8px;
}

.ipdf-template-doc__entry{
  padding: 0 0 14px;
  border-bottom: 1px solid #E5E7EB;
  background: transparent;
}

.ipdf-template-doc__entry-title{
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 600;
  color: #1A1A1A;
}

.ipdf-template-doc__entry-subtitle{
  margin-top: 3px;
  color: var(--ipdf-template-doc-accent, #6d28d9);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 500;
}

.ipdf-template-doc__entry-meta{
  margin-top: 5px;
  color: #9CA3AF;
  font-size: 11px;
  line-height: 1.35;
}

.ipdf-template-doc__entry-body{
  margin-top: 9px;
}

.ipdf-template-doc__entry-line{
  margin: 0 0 6px;
  font-size: 13px;
  line-height: 1.7;
  color: #6B7280;
}

.ipdf-template-doc__note{
  margin-top: 8px;
  color: #9CA3AF;
  font-size: 12px;
  line-height: 1.5;
}

.ipdf-template-doc__tag-row{
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.ipdf-template-doc__tag{
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--ipdf-template-doc-accent-soft, rgba(109, 40, 217, 0.06));
  color: var(--ipdf-template-doc-accent, #6d28d9);
  font-size: 12px;
  line-height: 1;
  font-weight: 600;
}

.ipdf-template-doc__table{
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.ipdf-template-doc__table th{
  text-align: left;
  padding: 10px 12px;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ipdf-template-doc-accent, #6d28d9);
  border-bottom: 2px solid var(--ipdf-template-doc-accent, #6d28d9);
  background: var(--ipdf-template-doc-accent-soft, rgba(109, 40, 217, 0.06));
}

.ipdf-template-doc__table td{
  padding: 10px 12px;
  border-bottom: 1px solid #E5E7EB;
  color: #6B7280;
}

.ipdf-template-doc__total-row td{
  border-top: 2px solid var(--ipdf-template-doc-accent, #6d28d9);
  border-bottom: none;
  color: #1A1A1A;
  font-weight: 600;
}

.ipdf-template-doc__total-row td span{
  display: inline-block;
  margin-inline-end: 12px;
}

.ipdf-template-doc__total-row td strong{
  color: var(--ipdf-template-doc-accent, #6d28d9);
  font-size: 15px;
}

.ipdf-template-doc[dir="rtl"] .ipdf-template-doc__table th,
.ipdf-template-doc[dir="rtl"] .ipdf-template-doc__table td{
  text-align: right;
}

.ipdf-template-doc__product{
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) minmax(92px, auto);
  gap: 13px;
  align-items: start;
  padding: 12px 0 14px;
  border-bottom: 1px solid #E5E7EB;
  background: transparent;
}

.ipdf-template-doc__product-image,
.ipdf-template-doc__image-placeholder{
  display: block;
  width: 74px;
  height: 74px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #E5E7EB;
  background: #FAFAFA;
}

.ipdf-template-doc__product-copy{
  min-width: 0;
}

.ipdf-template-doc__product-pricing{
  display: grid;
  grid-template-columns: auto;
  gap: 3px;
  min-width: 88px;
  color: #9CA3AF;
  font-size: 11px;
  line-height: 1.2;
  text-align: end;
}

.ipdf-template-doc__product-pricing strong{
  margin-bottom: 6px;
  color: #1A1A1A;
  font-size: 13px;
  font-weight: 600;
}

.ipdf-template-doc__product-pricing strong.is-accent{
  color: var(--ipdf-template-doc-accent, #6d28d9);
}

.ipdf-template-doc__signature-grid{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  margin-top: 32px;
}

.ipdf-template-doc__signature-block{
  min-width: 0;
}

.ipdf-template-doc__signature-label{
  margin-bottom: 16px;
  color: #9CA3AF;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  line-height: 1.2;
  text-transform: uppercase;
}

.ipdf-template-doc__signature-line{
  height: 1px;
  background: #1A1A1A;
  margin: 16px 0 8px;
}

.ipdf-template-doc__signature-name{
  font-size: 13px;
  line-height: 1.35;
  font-weight: 500;
  color: #1A1A1A;
}

.ipdf-template-doc__signature-detail{
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.35;
  color: #9CA3AF;
}

.ipdf-template-doc__signature-assets{
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 10px 0;
}

.ipdf-template-doc__signature-image{
  display: block;
  max-width: 180px;
  max-height: 72px;
  object-fit: contain;
}

.ipdf-template-doc__stamp-image{
  display: block;
  max-width: 92px;
  max-height: 92px;
  object-fit: contain;
}

.ipdf-template-doc__invoice-header{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 32px;
}

.ipdf-template-doc__invoice-brand{
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.ipdf-template-doc__invoice-brand .ipdf-template-doc__logo{
  margin-bottom: 8px;
}

.ipdf-template-doc__invoice-brand-name{
  font-size: 22px;
  line-height: 1.2;
  font-weight: 700;
  color: #1A1A1A;
}

.ipdf-template-doc__invoice-brand-tag{
  font-size: 12px;
  line-height: 1.4;
  color: #9CA3AF;
}

.ipdf-template-doc__invoice-badge{
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 12px;
  border: 1px solid rgba(var(--ipdf-template-doc-accent-rgb, 109, 40, 217), 0.32);
  border-radius: 999px;
  background: var(--ipdf-template-doc-accent-soft, rgba(109, 40, 217, 0.06));
  color: var(--ipdf-template-doc-accent, #6d28d9);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  line-height: 1;
  text-transform: uppercase;
}

.ipdf-template-doc__invoice-grid{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  background: #FAFAFA;
}

.ipdf-template-doc__invoice-field-label{
  margin-bottom: 4px;
  color: #9CA3AF;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  line-height: 1.2;
  text-transform: uppercase;
}

.ipdf-template-doc__invoice-field-value{
  color: #1A1A1A;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
}

.ipdf-template-doc__invoice-field-muted{
  margin-top: 2px;
  color: #9CA3AF;
  font-size: 12px;
  line-height: 1.45;
}

.ipdf-template-doc__invoice-table{
  margin: 12px 0;
}

.ipdf-template-doc[dir="rtl"] .ipdf-template-doc__header,
.ipdf-template-doc[dir="rtl"] .ipdf-template-doc__invoice-header{
  flex-direction: row-reverse;
}

.ipdf-template-doc[dir="rtl"] .ipdf-template-doc__header-side{
  text-align: left;
}

@media print{
  .ipdf-template-doc{
    background: #FFFFFF;
  }
}
