.mpdf {
  --mpdf-ink: #172033;
  --mpdf-muted: #5d6678;
  --mpdf-line: #e3e6ee;
  --mpdf-primary: #6658d3;
  --mpdf-primary-dark: #5043b7;
  --mpdf-primary-soft: #f1efff;
  --mpdf-success: #16805b;
  --mpdf-success-soft: #edfaf5;
  position: relative;
  max-width: 820px;
  margin: clamp(32px, 6vw, 76px) auto;
  padding: 0 20px 20px;
  color: var(--mpdf-ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.mpdf *,
.mpdf *::before,
.mpdf *::after {
  box-sizing: border-box;
}

.mpdf [hidden] {
  display: none !important;
}

.mpdf__header {
  display: none !important;
  max-width: 690px;
  margin: 0 auto 28px;
  text-align: center;
}

.mpdf__eyebrow {
  display: inline-flex;
  margin: 0 0 14px;
  padding: 7px 12px;
  border: 1px solid #ddd8ff;
  border-radius: 999px;
  background: var(--mpdf-primary-soft);
  color: var(--mpdf-primary-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
}

.mpdf__header h1 {
  margin: 0;
  color: var(--mpdf-ink);
  font-size: clamp(34px, 6vw, 54px);
  font-weight: 750;
  line-height: 1.08;
  letter-spacing: -.045em;
}

.mpdf__header > p:last-child {
  max-width: 620px;
  margin: 16px auto 0;
  color: var(--mpdf-muted);
  font-size: 16px;
  line-height: 1.65;
}

.mpdf__card {
  position: relative;
  padding: clamp(18px, 4vw, 34px);
  overflow: hidden;
  border: 1px solid rgba(210, 214, 225, .9);
  border-radius: 24px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 20px 55px rgba(39, 45, 77, .09);
}

.mpdf__tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  margin: 0 0 14px;
  padding: 7px;
  border: 1px solid var(--mpdf-line);
  border-radius: 17px;
  background: #f5f6fa;
  position: relative;
  z-index: 10;
}

.mpdf__tabs button {
  display: flex;
  min-height: 54px;
  padding: 9px 14px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1.5px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--mpdf-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer !important;
  pointer-events: auto !important;
  position: relative;
  z-index: 2;
  transition: color .18s ease, background-color .18s ease, box-shadow .18s ease, border-color .18s ease;
  user-select: none;
}

.mpdf__tabs button svg {
  width: 21px;
  height: 21px;
  pointer-events: none;
}

.mpdf__tabs button span {
  pointer-events: none;
}

.mpdf__tabs button:hover {
  color: var(--mpdf-primary-dark);
  background: rgba(255, 255, 255, .75);
}

.mpdf__tabs button[aria-selected="true"] {
  background: #ffffff !important;
  color: var(--mpdf-primary) !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 4px 12px rgba(37, 43, 73, .12), inset 0 -3px 0 var(--mpdf-primary) !important;
  font-weight: 800 !important;
}

.mpdf__tabs button:focus-visible {
  outline: 3px solid rgba(102, 88, 211, .26);
  outline-offset: 2px;
}

.mpdf__card::before {
  position: absolute;
  top: -150px;
  right: -120px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(102, 88, 211, .07);
  content: "";
  pointer-events: none;
}

.mpdf__drop {
  position: relative;
  display: flex;
  min-height: 245px;
  padding: 30px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  overflow: hidden;
  border: 1.5px dashed #b9b5d9;
  border-radius: 18px;
  background: linear-gradient(180deg, #fbfaff 0%, #f7f6fc 100%);
  text-align: center;
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}

.mpdf__drop:hover,
.mpdf__drop.is-dragging {
  border-color: var(--mpdf-primary);
  background: #f4f2ff;
  box-shadow: inset 0 0 0 1px rgba(102, 88, 211, .12);
}

.mpdf__drop:focus-within {
  outline: 3px solid rgba(102, 88, 211, .24);
  outline-offset: 3px;
}

.mpdf__drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.mpdf__icon {
  display: grid;
  width: 66px;
  height: 66px;
  margin-bottom: 18px;
  place-items: center;
  border: 1px solid #dedaff;
  border-radius: 18px;
  background: #fff;
  color: var(--mpdf-primary);
  box-shadow: 0 9px 24px rgba(70, 58, 160, .12);
}

.mpdf__icon svg {
  width: 30px;
  height: 30px;
}

.mpdf__drop strong {
  max-width: 100%;
  overflow: hidden;
  color: var(--mpdf-ink);
  font-size: 17px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mpdf__drop > span:last-of-type {
  margin-top: 7px;
  color: var(--mpdf-muted);
  font-size: 13px;
}

.mpdf__levels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin: 26px 0 20px;
  padding: 0;
  border: 0;
}

.mpdf__levels legend {
  font-size: 13px;
  font-weight: 700;
  color: var(--mpdf-ink);
  margin-bottom: 8px;
}

.mpdf__range-box {
  margin: 18px 0 14px;
}

.mpdf__range-box label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--mpdf-ink);
}

.mpdf__range-box label small {
  color: var(--mpdf-muted);
  font-weight: 400;
}

.mpdf__text-input {
  display: block !important;
  position: static !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  width: 100% !important;
  height: 44px !important;
  padding: 8px 14px !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 10px !important;
  font: inherit !important;
  font-size: 14px !important;
  color: var(--mpdf-ink) !important;
  background: #ffffff !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05) !important;
  transition: border-color .15s ease, box-shadow .15s ease !important;
}

.mpdf__text-input:focus {
  outline: none !important;
  border-color: var(--mpdf-primary) !important;
  box-shadow: 0 0 0 3px rgba(102, 88, 211, .2) !important;
}

.mpdf__protect-fieldset {
  margin: 20px 0 !important;
  padding: 18px 20px !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 14px !important;
  background: #f8fafc !important;
}

.mpdf__protect-fieldset legend {
  padding: 0 8px !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  color: var(--mpdf-ink) !important;
}

.mpdf__input-group {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  font-size: 13.5px !important;
}

.mpdf__input-group label {
  color: var(--mpdf-ink) !important;
  font-weight: 600 !important;
}

.mpdf__password-wrapper {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
}

.mpdf__password-wrapper .mpdf__text-input {
  padding-right: 46px !important;
}

.mpdf__pw-toggle {
  position: absolute !important;
  right: 10px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 32px !important;
  height: 32px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: #64748b !important;
  cursor: pointer !important;
  transition: color .15s ease, background-color .15s ease !important;
  z-index: 3 !important;
}

.mpdf__pw-toggle:hover {
  color: #0f172a !important;
  background: rgba(0, 0, 0, 0.06) !important;
}

.mpdf__pw-toggle svg {
  width: 18px !important;
  height: 18px !important;
  pointer-events: none !important;
}

.mpdf__file-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: 520px;
  margin: 14px 0 0;
  padding: 10px;
  overflow: auto;
  border: 1px solid var(--mpdf-line);
  border-radius: 13px;
  background: #f7f8fb;
}

.mpdf__file-list--single {
  grid-template-columns: minmax(0, 1fr);
}

.mpdf__preview-card {
  position: relative;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  min-width: 0;
  min-height: 132px;
  padding: 9px;
  gap: 8px 10px;
  overflow: hidden;
  border: 1px solid #e2e4ec;
  border-radius: 12px;
  background: #fff;
}

.mpdf__file-list--single .mpdf__preview-card {
  grid-template-columns: minmax(160px, 42%) minmax(0, 1fr);
  min-height: 190px;
}

.mpdf__preview-canvas {
  position: relative;
  grid-row: 1 / 3;
  min-height: 112px;
  overflow: hidden;
  border: 1px solid #e1e3e9;
  border-radius: 8px;
  background: #eef0f4;
}

.mpdf__file-list--single .mpdf__preview-canvas {
  min-height: 170px;
}

.mpdf__preview-canvas iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
  pointer-events: none;
}

.mpdf__preview-canvas > span {
  position: absolute;
  right: 5px;
  bottom: 5px;
  padding: 3px 5px;
  border-radius: 4px;
  background: rgba(23, 32, 51, .78);
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .08em;
}

.mpdf__preview-info {
  min-width: 0;
  align-self: end;
}

.mpdf__preview-info > span {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.mpdf__preview-info b {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 7px;
  background: var(--mpdf-primary-soft);
  color: var(--mpdf-primary);
  font-size: 10px;
}

.mpdf__preview-info [data-mpdf-preview-name] {
  overflow: hidden;
  color: var(--mpdf-ink);
  font-size: 11.5px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mpdf__preview-info small {
  display: block;
  margin: 6px 0 0 29px;
  color: var(--mpdf-muted);
  font-size: 10.5px;
}

.mpdf__preview-open {
  display: inline-flex;
  min-height: 34px;
  padding: 0 10px;
  align-items: center;
  justify-content: center;
  align-self: end;
  gap: 6px;
  border: 1px solid #d9d5fa;
  border-radius: 8px;
  background: var(--mpdf-primary-soft);
  color: var(--mpdf-primary-dark);
  font: inherit;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease;
}

.mpdf__preview-open:hover {
  border-color: var(--mpdf-primary);
  background: #e8e4ff;
}

.mpdf__preview-open:focus-visible {
  outline: 3px solid rgba(102, 88, 211, .25);
  outline-offset: 2px;
}

.mpdf__preview-open svg {
  width: 15px;
  height: 15px;
}

.mpdf__preview-dialog {
  width: min(1080px, calc(100vw - 32px));
  height: min(850px, calc(100vh - 32px));
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: #fff;
  color: var(--mpdf-ink);
  box-shadow: 0 30px 90px rgba(12, 18, 35, .32);
}

.mpdf__preview-dialog::backdrop {
  background: rgba(12, 18, 35, .72);
  backdrop-filter: blur(4px);
}

.mpdf__preview-head {
  display: flex;
  min-height: 58px;
  padding: 10px 12px 10px 18px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--mpdf-line);
}

.mpdf__preview-head strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mpdf__preview-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mpdf__preview-ext-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 8px;
  background: var(--mpdf-primary-soft, #f0eefd);
  color: var(--mpdf-primary, #4e36f5);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all .15s ease;
}

.mpdf__preview-ext-btn:hover {
  background: var(--mpdf-primary, #4e36f5);
  color: #fff;
}

.mpdf__preview-head button {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: #f0f1f5;
  color: var(--mpdf-ink);
  cursor: pointer;
}

.mpdf__preview-head button:hover {
  background: #e4e6ec;
}

.mpdf__preview-head button:focus-visible {
  outline: 3px solid rgba(102, 88, 211, .28);
}

.mpdf__preview-head svg {
  width: 20px;
  height: 20px;
}

.mpdf__preview-dialog > iframe {
  display: block;
  width: 100%;
  height: calc(100% - 58px);
  border: 0;
  background: #e9ebf0;
}

.mpdf__page-picker {
  display: block;
  max-height: 680px;
  padding: 0;
  background: #f6f7fa;
}

.mpdf__page-group + .mpdf__page-group {
  border-top: 1px solid var(--mpdf-line);
}

.mpdf__page-group-head {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  min-height: 58px;
  padding: 10px 13px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--mpdf-line);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
}

.mpdf__page-group-head > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.mpdf__page-group-head b {
  overflow: hidden;
  color: var(--mpdf-ink);
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mpdf__page-group-head small {
  margin-top: 2px;
  color: var(--mpdf-muted);
  font-size: 10.5px;
}

.mpdf__page-sort-tip {
  display: flex;
  align-items: center;
  margin: 6px 0 12px;
  padding: 9px 14px;
  border-radius: 9px;
  background: var(--mpdf-primary-soft, #f0eefd);
  color: var(--mpdf-primary-dark, #3b28b6);
  font-size: 11.5px;
  line-height: 1.45;
  border: 1px solid #d9d5fa;
}

.mpdf__page-sort-tip span {
  display: inline-block;
}

.mpdf__page-group-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.mpdf__group-btn,
.mpdf__page-group-head button {
  min-height: 30px;
  padding: 0 10px;
  flex: 0 0 auto;
  border: 1px solid #d9d5fa;
  border-radius: 7px;
  background: var(--mpdf-primary-soft, #f0eefd);
  color: var(--mpdf-primary-dark, #3b28b6);
  font: inherit;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all .16s ease;
}

.mpdf__group-btn:hover,
.mpdf__page-group-head button:hover {
  border-color: var(--mpdf-primary);
  background: #e9e6ff;
}

.mpdf__page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(136px, 1fr));
  gap: 12px;
  padding: 12px;
  min-height: 80px;
}

.mpdf__page-card {
  position: relative;
  display: flex;
  min-width: 0;
  padding: 8px;
  flex-direction: column;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(25, 32, 55, .07);
  cursor: grab;
  user-select: none;
  transition: border-color .18s ease, opacity .18s ease, box-shadow .18s ease, transform .15s ease;
}

.mpdf__page-card:active {
  cursor: grabbing;
}

.mpdf__page-card:not(.is-selected) {
  opacity: .48;
}

.mpdf__page-card.is-selected {
  border-color: var(--mpdf-primary);
  box-shadow: 0 5px 15px rgba(80, 67, 183, .14);
}

.mpdf__page-card.is-dragging {
  opacity: .28;
  transform: scale(0.95);
}

.mpdf__page-card.is-drag-over-before {
  border-left: 3px solid var(--mpdf-primary);
  box-shadow: -4px 0 0 0 var(--mpdf-primary), 0 5px 15px rgba(80, 67, 183, .14);
  transform: translateX(2px);
}

.mpdf__page-card.is-drag-over-after {
  border-right: 3px solid var(--mpdf-primary);
  box-shadow: 4px 0 0 0 var(--mpdf-primary), 0 5px 15px rgba(80, 67, 183, .14);
  transform: translateX(-2px);
}

.mpdf__page-card-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 6px;
  z-index: 2;
}

.mpdf__page-check {
  position: static;
  display: inline-flex;
  cursor: pointer;
}

.mpdf__page-check input {
  position: absolute;
  opacity: 0;
}

.mpdf__page-check > span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 2px solid #aeb4c1;
  border-radius: 6px;
  background: rgba(255, 255, 255, .94);
  color: transparent;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .12);
  transition: all .15s ease;
}

.mpdf__page-check input:checked + span {
  border-color: var(--mpdf-primary);
  background: var(--mpdf-primary);
  color: #fff;
}

.mpdf__order-btns {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: #f1f3f7;
  border-radius: 6px;
  padding: 1px;
}

.mpdf__order-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: #fff;
  color: var(--mpdf-ink);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  transition: all .14s ease;
}

.mpdf__order-btn:hover {
  background: var(--mpdf-primary);
  color: #fff;
  border-color: var(--mpdf-primary);
}

.mpdf__preview-btn {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: rgba(23, 32, 51, .84);
  color: #fff;
  cursor: zoom-in;
  padding: 0;
  transition: background-color .15s ease;
}

.mpdf__preview-btn:hover {
  background: var(--mpdf-primary-dark);
}

.mpdf__preview-btn svg {
  width: 13px;
  height: 13px;
}

.mpdf__page-thumb-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 152px;
  background: #f1f3f7;
  border-radius: 6px;
  overflow: hidden;
  cursor: zoom-in;
}

.mpdf__page-thumb-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 100%;
  color: #8b95a5;
  font-size: 11px;
  font-weight: 600;
  background: linear-gradient(180deg, #f8f9fb 0%, #edf0f5 100%);
  user-select: none;
}

.mpdf__page-thumb-placeholder svg {
  width: 28px;
  height: 28px;
  opacity: .65;
}

.mpdf__page-thumb-wrap canvas {
  width: 100%;
  height: 152px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
}

.mpdf__page-thumb-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: rgba(30, 24, 76, 0.45);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  opacity: 0;
  transition: opacity .15s ease;
  pointer-events: none;
  backdrop-filter: blur(1.5px);
}

.mpdf__page-thumb-wrap:hover .mpdf__page-thumb-overlay {
  opacity: 1;
}

.mpdf__group-btn--preview {
  background: #eef2ff !important;
  border-color: #818cf8 !important;
  color: #3730a3 !important;
  font-weight: 700 !important;
}

.mpdf__group-btn--preview:hover {
  background: #6366f1 !important;
  color: #fff !important;
  border-color: #6366f1 !important;
}

.mpdf__page-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-top: 6px;
  font-size: 11px;
}

.mpdf__page-drag-handle {
  cursor: grab;
  color: #9ca3af;
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
  user-select: none;
}

.mpdf__page-drag-handle:hover {
  color: var(--mpdf-primary);
}

.mpdf__page-number {
  color: var(--mpdf-ink);
  font-size: 11px;
  font-weight: 750;
  text-align: center;
  flex: 1;
}

.mpdf__page-origin {
  font-size: 9.5px;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--mpdf-primary-soft);
  color: var(--mpdf-primary-dark);
  font-weight: 700;
  white-space: nowrap;
}

.mpdf__selection-hint {
  margin: 12px 0 20px;
  color: var(--mpdf-muted);
  font-size: 12px;
  text-align: center;
}

.mpdf__range {
  display: block;
  margin: 22px 0;
}

.mpdf__range > span {
  display: block;
  margin-bottom: 9px;
  color: var(--mpdf-ink);
  font-size: 14px;
  font-weight: 750;
}

.mpdf__range input {
  width: 100%;
  min-height: 50px;
  padding: 0 15px;
  border: 1px solid var(--mpdf-line);
  border-radius: 12px;
  background: #fff;
  color: var(--mpdf-ink);
  font: inherit;
  font-size: 14px;
}

.mpdf__range input:focus {
  border-color: var(--mpdf-primary);
  outline: 3px solid rgba(102, 88, 211, .18);
}

.mpdf__range small {
  display: block;
  margin-top: 7px;
  color: var(--mpdf-muted);
  font-size: 11.5px;
}

.mpdf__levels legend {
  width: 100%;
  margin: 0 0 11px;
  color: var(--mpdf-ink);
  font-size: 14px;
  font-weight: 750;
}

.mpdf__levels label {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.mpdf__levels input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mpdf__levels span {
  position: relative;
  display: flex;
  height: 100%;
  min-height: 82px;
  padding: 14px 15px 13px 39px;
  flex-direction: column;
  border: 1px solid var(--mpdf-line);
  border-radius: 13px;
  background: #fff;
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.mpdf__levels span::before {
  position: absolute;
  top: 16px;
  left: 14px;
  width: 15px;
  height: 15px;
  border: 2px solid #aeb4c1;
  border-radius: 50%;
  content: "";
}

.mpdf__levels strong {
  color: var(--mpdf-ink);
  font-size: 14px;
  line-height: 1.2;
}

.mpdf__levels small {
  margin-top: 5px;
  color: var(--mpdf-muted);
  font-size: 11.5px;
  line-height: 1.4;
}

.mpdf__levels label:hover span {
  border-color: #bbb5e9;
}

.mpdf__levels input:checked + span {
  border-color: var(--mpdf-primary);
  background: var(--mpdf-primary-soft);
  box-shadow: 0 0 0 1px rgba(102, 88, 211, .08);
}

.mpdf__levels input:checked + span::before {
  border: 4px solid var(--mpdf-primary);
  background: #fff;
}

.mpdf__levels input:focus-visible + span {
  outline: 3px solid rgba(102, 88, 211, .24);
  outline-offset: 2px;
}

.mpdf__button,
.mpdf__download {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 13px;
  background: var(--mpdf-primary);
  color: #fff !important;
  font-size: 14px;
  font-weight: 750;
  line-height: 1;
  text-decoration: none !important;
  cursor: pointer;
  box-shadow: 0 9px 22px rgba(80, 67, 183, .22);
  transition: background-color .18s ease, box-shadow .18s ease;
}

.mpdf__button {
  width: 100%;
}

.mpdf__button:hover:not(:disabled),
.mpdf__download:hover {
  background: var(--mpdf-primary-dark);
  box-shadow: 0 11px 26px rgba(80, 67, 183, .28);
}

.mpdf__button:focus-visible,
.mpdf__download:focus-visible {
  outline: 3px solid rgba(102, 88, 211, .3);
  outline-offset: 3px;
}

.mpdf__button:disabled {
  background: #c7c9d1;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 1;
}

.mpdf__spinner {
  display: none;
  width: 17px;
  height: 17px;
  margin-left: 10px;
  border: 2px solid rgba(255, 255, 255, .42);
  border-top-color: #fff;
  border-radius: 50%;
  animation: mpdf-spin .7s linear infinite;
}

.mpdf__card.is-loading .mpdf__spinner {
  display: block;
}

.mpdf__card.is-loading .mpdf__drop,
.mpdf__card.is-loading .mpdf__levels {
  pointer-events: none;
  opacity: .68;
}

.mpdf__status {
  min-height: 20px;
  margin-top: 12px;
  color: var(--mpdf-muted);
  font-size: 12.5px;
  line-height: 1.5;
  text-align: center;
}

.mpdf__status--error {
  color: #b1273c;
  font-weight: 650;
}

[data-mpdf-new-turn] {
  margin-left: 6px;
  color: var(--mpdf-primary, #4e36f5);
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  font-family: inherit;
  display: inline-block;
  vertical-align: baseline;
}

[data-mpdf-new-turn]:hover {
  color: var(--mpdf-primary-dark, #3522ba);
}

.mpdf__result {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  margin-top: 18px;
  padding: 20px;
  align-items: center;
  border: 1px solid #b9e2d2;
  border-radius: 18px;
  background: var(--mpdf-success-soft);
  box-shadow: 0 12px 30px rgba(22, 128, 91, .08);
}

.mpdf__result-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 13px;
  background: var(--mpdf-success);
  color: #fff;
}

.mpdf__result-icon svg {
  width: 23px;
  height: 23px;
}

.mpdf__result strong {
  color: #105d44;
  font-size: 15px;
}

.mpdf__result p {
  margin: 4px 0 0;
  color: #49675d;
  font-size: 12.5px;
  line-height: 1.45;
}

.mpdf__download {
  min-height: 46px;
  padding: 0 19px;
  background: var(--mpdf-success);
  box-shadow: none;
  white-space: nowrap;
}

.mpdf__download:hover {
  background: #106847;
  box-shadow: none;
}

.mpdf__jobs {
  display: grid;
  margin-top: 18px;
  gap: 10px;
}

.mpdf__job {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  min-height: 76px;
  padding: 14px 16px;
  align-items: center;
  border: 1px solid var(--mpdf-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 8px 24px rgba(39, 45, 77, .06);
}

.mpdf__job-state {
  width: 12px;
  height: 12px;
  border: 3px solid #d9d5ff;
  border-top-color: var(--mpdf-primary);
  border-radius: 50%;
  animation: mpdf-spin .8s linear infinite;
}

.mpdf__job[data-status="completed"] .mpdf__job-state {
  border: 0;
  background: var(--mpdf-success);
  box-shadow: 0 0 0 5px var(--mpdf-success-soft);
  animation: none;
}

.mpdf__job[data-status="failed"] .mpdf__job-state,
.mpdf__job[data-status="cancelled"] .mpdf__job-state,
.mpdf__job[data-status="expired"] .mpdf__job-state {
  border: 0;
  background: #c43f52;
  box-shadow: 0 0 0 5px #fff0f2;
  animation: none;
}

.mpdf__job-copy {
  min-width: 0;
}

.mpdf__job-copy strong,
.mpdf__job-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mpdf__job-copy strong {
  color: var(--mpdf-ink);
  font-size: 13.5px;
}

.mpdf__job-copy small {
  margin-top: 4px;
  color: var(--mpdf-muted);
  font-size: 12px;
}

.mpdf__job progress {
  display: block;
  width: min(260px, 100%);
  height: 4px;
  margin-top: 9px;
  overflow: hidden;
  border: 0;
  border-radius: 99px;
  background: #ececf4;
  color: var(--mpdf-primary);
  accent-color: var(--mpdf-primary);
}

.mpdf__job progress::-webkit-progress-bar { background: #ececf4; }
.mpdf__job progress::-webkit-progress-value { border-radius: 99px; background: var(--mpdf-primary); transition: width .25s ease; }
.mpdf__job progress::-moz-progress-bar { border-radius: 99px; background: var(--mpdf-primary); }

.mpdf__job-actions {
  display: flex;
  gap: 7px;
}

.mpdf__job-actions button {
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid #d9dce6;
  border-radius: 11px;
  background: #fff;
  color: var(--mpdf-primary-dark);
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.mpdf__job-actions [data-mpdf-job-download] {
  border-color: var(--mpdf-primary);
  background: var(--mpdf-primary);
  color: #fff;
}

.mpdf__job-actions button:focus-visible {
  outline: 3px solid rgba(102, 88, 211, .28);
  outline-offset: 2px;
}

.mpdf__job-actions button:disabled {
  cursor: wait;
  opacity: .6;
}

.mpdf__split-results {
  margin-top: 13px;
  padding: 12px;
  border: 1px solid #e1def8;
  border-radius: 14px;
  background: #fbfaff;
}

.mpdf__split-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px 12px;
  align-items: center;
}

.mpdf__split-toolbar label {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  color: var(--mpdf-ink);
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.mpdf__split-toolbar input,
.mpdf__split-file input {
  width: 17px;
  height: 17px;
  accent-color: var(--mpdf-primary);
  cursor: pointer;
}

.mpdf__split-toolbar small {
  grid-column: 1;
  color: var(--mpdf-muted);
  font-size: 11px;
}

.mpdf__split-toolbar > div {
  display: flex;
  grid-row: 1 / 3;
  grid-column: 2;
  gap: 7px;
}

.mpdf__split-toolbar button,
.mpdf__split-file button {
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid #d9d5fa;
  border-radius: 9px;
  background: #fff;
  color: var(--mpdf-primary-dark);
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease, color .18s ease;
}

.mpdf__split-toolbar button:last-child {
  border-color: var(--mpdf-primary);
  background: var(--mpdf-primary);
  color: #fff;
}

.mpdf__split-toolbar button:hover:not(:disabled),
.mpdf__split-file button:hover {
  border-color: var(--mpdf-primary);
  background: #eeeaff;
  color: var(--mpdf-primary-dark);
}

.mpdf__split-toolbar button:last-child:hover {
  background: var(--mpdf-primary-dark);
  color: #fff;
}

.mpdf__split-toolbar button:focus-visible,
.mpdf__split-file button:focus-visible,
.mpdf__split-toolbar input:focus-visible,
.mpdf__split-file input:focus-visible {
  outline: 3px solid rgba(102, 88, 211, .28);
  outline-offset: 2px;
}

.mpdf__split-toolbar button:disabled {
  cursor: not-allowed;
  opacity: .56;
}

.mpdf__split-list {
  display: grid;
  max-height: 310px;
  margin-top: 10px;
  gap: 7px;
  overflow: auto;
}

.mpdf__split-file {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 9px;
  align-items: center;
  border: 1px solid #e4e5ee;
  border-radius: 11px;
  background: #fff;
  opacity: .64;
  transition: border-color .18s ease, opacity .18s ease, background-color .18s ease;
}

.mpdf__split-file.is-selected {
  border-color: #c9c2f5;
  background: #fff;
  opacity: 1;
}

.mpdf__split-file label {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}

.mpdf__split-file span {
  min-width: 0;
}

.mpdf__split-file strong,
.mpdf__split-file small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mpdf__split-file strong {
  color: var(--mpdf-ink);
  font-size: 12px;
}

.mpdf__split-file small {
  margin-top: 3px;
  color: var(--mpdf-muted);
  font-size: 10.5px;
}

.mpdf__trust {
  display: flex;
  margin: 20px 0 0;
  padding: 0;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px 20px;
  color: var(--mpdf-muted);
  font-size: 11.5px;
  list-style: none;
}

.mpdf__trust li {
  position: relative;
  padding-left: 17px;
}

.mpdf__trust li::before {
  position: absolute;
  left: 0;
  color: var(--mpdf-success);
  font-weight: 800;
  content: "✓";
}

.mpdf__honey {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

@keyframes mpdf-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
  .mpdf {
    padding-inline: 14px;
  }

  .mpdf__header h1 {
    font-size: clamp(31px, 10vw, 42px);
  }

  .mpdf__card {
    border-radius: 19px;
  }

  .mpdf__tabs {
    gap: 4px;
    padding: 5px;
  }

  .mpdf__tabs button {
    min-height: 58px;
    padding: 7px 4px;
    flex-direction: column;
    gap: 3px;
    font-size: 11px;
  }

  .mpdf__drop {
    min-height: 210px;
    padding: 22px 16px;
    border-radius: 14px;
  }

  .mpdf__levels {
    grid-template-columns: 1fr;
  }

  .mpdf__levels span {
    min-height: auto;
    padding-block: 13px;
  }

  .mpdf__result {
    grid-template-columns: auto 1fr;
  }

  .mpdf__file-list {
    grid-template-columns: 1fr;
    max-height: 440px;
  }

  .mpdf__file-list--single .mpdf__preview-card {
    grid-template-columns: 105px minmax(0, 1fr);
    min-height: 142px;
  }

  .mpdf__file-list--single .mpdf__preview-canvas {
    min-height: 122px;
  }

  .mpdf__preview-dialog {
    width: 100vw;
    height: 100dvh;
    max-width: 100vw;
    max-height: 100dvh;
    border-radius: 0;
  }

  .mpdf__page-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 9px;
  }

  .mpdf__page-card canvas {
    height: 170px;
  }

  .mpdf__page-group-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .mpdf__download {
    grid-column: 1 / -1;
    width: 100%;
  }

  .mpdf__job {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .mpdf__job-actions {
    grid-column: 1 / -1;
    padding-left: 24px;
  }

  .mpdf__job-actions button {
    min-height: 44px;
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mpdf * {
    scroll-behavior: auto !important;
    transition: none !important;
  }

  .mpdf__spinner {
    animation-duration: 1.4s;
  }

  .mpdf__job-state {
    animation: none;
  }
}

.mpdf__page-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.mpdf__page-card-footer {
  padding-top: 6px;
  font-size: 11px;
  color: #475569;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@keyframes mpdf-card-pulse {
  0% { transform: scale(0.92); box-shadow: 0 0 0 3px var(--mpdf-primary, #4e36f5); }
  50% { transform: scale(1.03); box-shadow: 0 0 14px rgba(78, 54, 245, 0.45); }
  100% { transform: scale(1); box-shadow: none; }
}

.mpdf__page-card.is-just-pasted {
  animation: mpdf-card-pulse 0.5s ease-out;
  border-color: var(--mpdf-primary, #4e36f5) !important;
}

