/* Custom PDF workbench. The Apryse viewer owns PDF rendering and editing. */
.pec-editor {
  --pec-ink: #1d2637;
  --pec-muted: #778396;
  --pec-navy: #071f51;
  --pec-blue: #0755f9;
  --pec-line: #e1e6ef;
  --pec-canvas: #f1f5ff;
  --pec-processing-offset: 212px;
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #fff;
  color: var(--pec-ink);
  font: 14px/1.45 "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-align: left;
}
.pec-editor *, .pec-editor *::before, .pec-editor *::after { box-sizing: border-box; }
.pec-editor [hidden] { display: none !important; }
.pec-editor button, .pec-editor input, .pec-editor select, .pec-editor textarea { font: inherit; }
.pec-editor button { -webkit-appearance: none; appearance: none; cursor: pointer; }
.pec-editor button:disabled { cursor: default; opacity: .38; }
.pec-editor button svg { width: 22px; height: 22px; flex: none; display: block; }
.pec-editor button:focus-visible, .pec-editor a:focus-visible { outline: 2px solid #3779ff; outline-offset: 3px; }
.pec-editor input:focus-visible, .pec-editor select:focus-visible, .pec-editor textarea:focus-visible { outline: 2px solid #aac6ff; outline-offset: 1px; }
.pec-editor ::-webkit-scrollbar { width: 9px; height: 9px; }
.pec-editor ::-webkit-scrollbar-track { background: transparent; }
.pec-editor ::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 9px; background: #bdc8dc; background-clip: padding-box; }
.pec-editor ::-webkit-scrollbar-thumb:hover { background-color: #98a9c5; }

.pec-editor .pec-top {
  position: relative;
  z-index: 12;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(190px, 1fr);
  align-items: center;
  gap: 20px;
  min-height: 72px;
  flex: 0 0 72px;
  padding: 0 22px;
  border-bottom: 1px solid #edf0f6;
  background: #fff;
}
.pec-editor .pec-file { min-width: 0; display: flex; align-items: center; gap: 11px; }
.pec-editor .pec-logo {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: #edf3ff;
  color: var(--pec-blue);
}
.pec-editor .pec-logo svg { width: 23px; height: 23px; }
.pec-editor .pec-file > div { min-width: 0; }
.pec-editor .pec-filename { display: block; min-width: 0; max-width: 290px; overflow: hidden; color: #243147; font-size: 15px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.pec-editor .pec-status { display: block; margin-top: 3px; color: #8090a7; font-size: 11px; font-weight: 400; line-height: 1.3; }
.pec-editor .pec-modes { display: flex; align-items: center; justify-content: center; gap: 10px; }
.pec-editor .pec-mode { display: flex; height: 43px; align-items: center; justify-content: center; gap: 8px; padding: 0 19px; border: 0; border-radius: 24px; background: #f1f5ff; color: #2a3345; font-size: 14px; font-weight: 650; white-space: nowrap; transition: background .15s, color .15s; }
.pec-editor .pec-mode svg { width: 20px; height: 20px; }
.pec-editor .pec-mode:hover { background: #e5edff; }
.pec-editor .pec-mode.is-active { background: var(--pec-navy); color: #fff; box-shadow: 0 2px 5px #071f510d; }
.pec-editor .pec-top-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.pec-editor .pec-close { display: grid; width: 37px; height: 37px; place-items: center; padding: 0; border: 1px solid #e1e7f0; border-radius: 7px; background: #fff; color: #66758d; }
.pec-editor .pec-close:hover { border-color: #b7c9e5; background: #f5f8ff; color: #283a57; }
.pec-editor .pec-close svg { width: 18px; height: 18px; }
.pec-editor .pec-export { display: flex; height: 43px; align-items: center; justify-content: center; gap: 8px; padding: 0 22px; border: 1px solid var(--pec-blue); border-radius: 7px; background: var(--pec-blue); color: #fff; font-size: 14px; font-weight: 650; box-shadow: 0 2px 4px #0755f91a; }
.pec-editor .pec-export:hover:not(:disabled) { background: #0048de; border-color: #0048de; }
.pec-editor .pec-export svg { width: 20px; height: 20px; }

.pec-editor .pec-toolbar:empty { display: none; }
.pec-editor .pec-toolbar { position: relative; z-index: 11; display: flex; align-items: center; gap: 6px; flex: 0 0 58px; min-height: 58px; padding: 7px 14px; overflow-x: auto; overflow-y: hidden; border-bottom: 1px solid #dce5f7; background: #fff; scrollbar-width: thin; }
.pec-editor .pec-tool { display: inline-flex; align-items: center; justify-content: center; gap: 7px; flex: none; height: 40px; padding: 0 11px; border: 1px solid #dce1e9; border-radius: 6px; background: #fff; color: #283344; font-size: 13px; font-weight: 500; line-height: 1; white-space: nowrap; transition: background .12s, border-color .12s, color .12s; }
.pec-editor .pec-tool:hover:not(:disabled) { background: #f6f8fd; border-color: #b9c9e3; }
.pec-editor .pec-tool.is-active, .pec-editor .pec-tool[aria-expanded="true"] { border-color: #d6e4ff; background: #e7efff; color: #0755f9; }
.pec-editor .pec-tool.is-active:hover { background: #dce8ff; }
.pec-editor .pec-tool svg { width: 21px; height: 21px; }
.pec-editor .pec-tool svg:last-child:not(:first-child) { width: 13px; height: 13px; margin-left: 1px; }
.pec-editor .pec-icon-only { display: inline-grid; place-items: center; flex: none; width: 39px; height: 39px; padding: 0; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #3e4c63; }
.pec-editor .pec-icon-only:hover:not(:disabled) { background: #e9f0ff; color: #0755f9; }
.pec-editor .pec-icon-only.is-active { background: #e5eeff; color: #0755f9; }
.pec-editor .pec-tool.pec-icon-only { width: 40px; border-color: #e0e5ed; }
.pec-editor .pec-tool.pec-icon-only.is-active { border-color: #e5eeff; }
.pec-editor .pec-divider { flex: none; align-self: center; width: 1px; height: 23px; margin: 0 7px; background: #dce2ed; }
.pec-editor .pec-toolbar-spacer { flex: 1; min-width: 8px; }

.pec-editor .pec-dropdown { position: fixed; z-index: 12030; display: none; min-width: 220px; max-width: min(320px, calc(100vw - 20px)); max-height: min(500px, calc(100vh - 160px)); overflow: auto; padding: 8px; border: 1px solid #e6eaf1; border-radius: 9px; background: #fff; box-shadow: 0 14px 35px #152b4c24, 0 2px 7px #152b4c0a; }
.pec-editor .pec-dropdown.is-open { display: block; animation: pec-menu-enter .1s ease-out; }
.pec-editor .pec-menu-item { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 48px; padding: 9px 14px; border: 0; border-radius: 5px; background: #fff; color: #263347; font-size: 14px; text-align: left; white-space: nowrap; }
.pec-editor .pec-menu-item svg { width: 23px; height: 23px; }
.pec-editor .pec-menu-item:hover, .pec-editor .pec-menu-item:focus-visible { background: #f0f5ff; }
.pec-editor .pec-menu-item.is-active, .pec-editor .pec-menu-item.is-selected { background: #e8f0ff; color: #0755f9; }
.pec-editor .pec-menu-label { display: block; padding: 8px 14px 5px; color: #8b98aa; font-size: 11px; font-weight: 600; }
.pec-editor .pec-menu-separator { height: 1px; margin: 5px 7px; background: #edf0f6; }

.pec-editor .pec-properties { z-index: 10; display: flex; flex: none; align-items: center; gap: 12px; min-height: 47px; padding: 6px 20px; border-bottom: 1px solid #dfe7f7; background: #fbfcff; color: #687891; font-size: 12px; }
.pec-editor .pec-properties label { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.pec-editor .pec-properties select, .pec-editor .pec-properties input[type="number"] { height: 30px; max-width: 170px; padding: 0 8px; border: 1px solid #dce4f0; border-radius: 5px; background: #fff; color: #344660; font-size: 12px; }
.pec-editor .pec-properties input[type="number"] { width: 66px; }
.pec-editor .pec-properties input[type="color"] { width: 28px; height: 28px; padding: 2px; border: 1px solid #dce4f0; border-radius: 5px; background: #fff; cursor: pointer; }
.pec-editor .pec-properties input[type="range"] { width: 90px; accent-color: #0755f9; }
.pec-editor .pec-properties .pec-icon-only { width: 29px; height: 29px; font-size: 15px; }
.pec-editor .pec-properties output { min-width: 30px; color: #4c5d76; }
.pec-editor .pec-properties > * { flex: none; }
.pec-editor button, .pec-editor select, .pec-editor .pec-pager { touch-action: manipulation; }
.pec-editor .pec-properties > span:first-child { white-space: nowrap; }

/* Tool settings float above the page, leaving the document area unchanged. */
.pec-editor .pec-tool-properties {
  position: absolute;
  z-index: 15;
  top: 14px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 11px;
  width: max-content;
  max-width: calc(100% - 28px);
  min-height: 52px;
  padding: 7px 13px;
  border: 1px solid #cfddff;
  border-radius: 6px;
  background: #fff;
  color: #28364b;
  box-shadow: 0 3px 12px #1b365e19;
  transform: translateX(-50%);
}
.pec-editor .pec-tool-properties .pec-icon { display: block; flex: none; width: 22px; height: 22px; color: #202b3c; }
.pec-editor .pec-param-group { display: inline-flex; flex: none; align-items: center; gap: 8px; margin: 0; color: #465771; font-size: 12px; white-space: nowrap; }
.pec-editor .pec-param-group label { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.pec-editor .pec-param-group input[type="number"] {
  width: 58px;
  height: 34px;
  padding: 0 3px 0 8px;
  border: 1px solid #d8dee8;
  border-radius: 3px;
  background: #fff;
  color: #253349;
  font-size: 13px;
  appearance: auto;
  -moz-appearance: auto;
}
.pec-editor .pec-param-group input[type="number"]::-webkit-inner-spin-button { opacity: 1; cursor: pointer; }
.pec-editor .pec-param-group input[type="number"]:hover { border-color: #b5c9eb; }
.pec-editor .pec-param-color { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 40px; height: 36px; margin: 0; cursor: pointer; }
.pec-editor .pec-param-color input[type="color"] { display: block; width: 28px; height: 28px; padding: 2px; overflow: hidden; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.pec-editor .pec-param-color input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.pec-editor .pec-param-color input[type="color"]::-webkit-color-swatch { border: 1px solid #0000000f; border-radius: 50%; }
.pec-editor .pec-param-color input[type="color"]::-moz-color-swatch { border: 1px solid #0000000f; border-radius: 50%; }
.pec-editor .pec-param-fill { display: inline-flex; flex: none; align-items: center; justify-content: center; gap: 7px; min-width: 34px; height: 34px; margin: 0; color: #536781; font-size: 12px; white-space: nowrap; cursor: pointer; }
.pec-editor .pec-param-fill input[type="checkbox"] { width: 15px; height: 15px; margin: 0; accent-color: #0755f9; cursor: pointer; }
.pec-editor .pec-fill-toggle { display: inline-flex; align-items: center; justify-content: center; min-width: 29px; height: 29px; border: 1px solid #dce3ef; border-radius: 4px; background: #fff; }
.pec-editor .pec-param-fill input:checked + .pec-fill-toggle { border-color: #c5d9ff; background: #eaf1ff; color: #0755f9; }
.pec-editor .pec-param-divider { flex: none; width: 1px; height: 27px; margin: 0 1px; background: #e2e6ee; }
.pec-editor .pec-param-title { flex: none; padding-right: 4px; color: #657690; font-size: 11px; white-space: nowrap; }
.pec-editor .pec-param-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }

.pec-editor .pec-workspace { position: relative; display: flex; flex: 1; min-height: 0; min-width: 0; overflow: hidden; background: var(--pec-canvas); }
.pec-editor .pec-sidebar { position: relative; z-index: 3; display: flex; flex: 0 0 212px; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; border-right: 1px solid #dce7fc; background: #e7efff; }
.pec-editor .pec-sidebar-head { display: flex; flex: 0 0 43px; align-items: center; justify-content: space-between; padding: 0 18px; color: #667c9b; font-size: 11px; font-weight: 600; }
.pec-editor .pec-sidebar-head button { width: 26px; height: 26px; }
.pec-editor .pec-thumbnails { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 17px 30px; overscroll-behavior: contain; }
.pec-editor .pec-viewer-pane { position: relative; flex: 1; min-width: 0; min-height: 0; overflow: hidden; background: var(--pec-canvas); }
.pec-editor .pec-viewer { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; }
.pec-editor .pec-viewer iframe { width: 100%; height: 100%; border: 0; }
.pec-editor .pec-crop-all-toggle { display: inline-flex; flex: none; align-items: center; gap: 9px; min-height: 40px; padding: 0 8px; color: #273348; font-size: 14px; white-space: nowrap; cursor: pointer; }
.pec-editor .pec-crop-all-toggle input { position: relative; flex: none; width: 40px; height: 23px; margin: 0; border: 1px solid #cfd7e5; border-radius: 999px; background: #dce2ed; appearance: none; cursor: pointer; transition: background .15s, border-color .15s; }
.pec-editor .pec-crop-all-toggle input::before { position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #14213d30; content: ''; transition: transform .15s; }
.pec-editor .pec-crop-all-toggle input:checked { border-color: #0755f9; background: #0755f9; }
.pec-editor .pec-crop-all-toggle input:checked::before { transform: translateX(17px); }
@media (max-width: 640px) { .pec-editor .pec-crop-all-toggle { gap: 6px; padding: 0 3px; font-size: 12px; } .pec-editor .pec-crop-all-toggle input { width: 34px; } .pec-editor .pec-crop-all-toggle input:checked::before { transform: translateX(11px); } }
.pec-editor .pec-page-card { position: relative; display: flex; flex-direction: column; align-items: center; width: 100%; margin: 0 auto; padding: 0; border-radius: 8px; }
.pec-editor .pec-thumb { position: relative; display: flex; justify-content: center; align-items: center; width: 100%; min-height: 172px; padding: 4px; border: 2px solid transparent; border-radius: 3px; background: transparent; transition: border-color .15s, background .15s; }
.pec-editor .pec-thumb canvas, .pec-editor .pec-thumb img { display: block; width: auto; max-width: 100%; height: auto; max-height: 245px; background: #fff; box-shadow: 0 1px 5px #253e5d15; object-fit: contain; pointer-events: none; }
.pec-editor .pec-thumb:hover { border-color: #aac5ff; background: #dae7ff; }
.pec-editor .pec-page-card.is-selected > .pec-thumb { border-color: #4b87ff; background: #dce9ff; }
.pec-editor .pec-page-actions { z-index: 2; display: flex; justify-content: center; align-items: center; gap: 3px; margin: -16px auto 0; padding: 3px 5px; border: 1px solid #e6ebf4; border-radius: 6px; background: #fff; box-shadow: 0 2px 4px #26466d12; }
.pec-editor .pec-page-actions button { display: grid; place-items: center; width: 33px; height: 31px; padding: 0; border: 0; border-radius: 4px; background: #fff; color: #3e4e64; }
.pec-editor .pec-page-actions button svg { width: 19px; height: 19px; }
.pec-editor .pec-page-actions button:hover { background: #eef4ff; color: #0755f9; }
.pec-editor .pec-page-actions button[data-page-action="delete"]:hover { background: #fff0f0; color: #e24a54; }
.pec-editor .pec-page-label { display: block; padding: 6px 0 1px; color: #5b6f8f; font-size: 12px; font-weight: 500; text-align: center; }
.pec-editor .pec-add-page { display: grid; width: 27px; height: 27px; flex: none; place-items: center; margin: 17px auto 23px; padding: 0; border: 0; border-radius: 50%; background: #9cbcff; color: #fff; transition: background .15s, transform .15s; }
.pec-editor .pec-add-page svg { width: 21px; height: 21px; }
.pec-editor .pec-add-page:hover { transform: scale(1.06); background: #377aff; }
.pec-editor .pec-page-card[draggable="true"] { cursor: grab; }
.pec-editor .pec-page-card.is-dragging { opacity: .45; }
.pec-editor .pec-page-card.is-drag-over { outline: 2px dashed #5c93ff; outline-offset: 7px; }
.pec-editor .pec-thumb-placeholder { width: 145px; min-height: 200px; display: grid; place-items: center; border: 1px solid #d8e2f3; background: #fff; color: #9aaac0; }

.pec-editor .pec-pager { position: absolute; z-index: 6; left: 50%; bottom: 22px; display: flex; align-items: center; gap: 3px; height: 48px; padding: 4px 10px; border: 1px solid #d7dfec; border-radius: 11px; background: #fff; color: #314259; box-shadow: 0 4px 15px #2a416b17; transform: translateX(-50%); white-space: nowrap; }
.pec-editor .pec-pager .pec-icon-only { width: 33px; height: 34px; }
.pec-editor .pec-pager .pec-icon-only svg { width: 19px; height: 19px; }
.pec-editor .pec-page-number { width: 36px; height: 30px; padding: 0 3px; border: 1px solid transparent; border-radius: 5px; background: #fff; color: #33425a; text-align: center; appearance: textfield; -moz-appearance: textfield; }
.pec-editor .pec-page-number::-webkit-outer-spin-button, .pec-editor .pec-page-number::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }
.pec-editor .pec-page-number:hover, .pec-editor .pec-page-number:focus { border-color: #d5e3ff; background: #f6f9ff; }
.pec-editor .pec-page-total { min-width: 38px; padding-right: 5px; color: #7d899c; font-size: 13px; }
.pec-editor .pec-pager .pec-divider { height: 23px; margin: 0 7px; }
.pec-editor .pec-zoom { width: 77px; height: 32px; padding: 0 4px; border: 0; border-radius: 4px; background: #fff; color: #33425a; cursor: pointer; text-align: center; font-size: 13px; }
.pec-editor .pec-zoom:hover { background: #f2f6ff; }

.pec-editor .pec-grid { position: absolute; z-index: 8; inset: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); align-content: start; justify-items: center; gap: 36px 45px; overflow-y: auto; padding: 30px 45px 45px; background: var(--pec-canvas); overscroll-behavior: contain; }
.pec-editor .pec-grid .pec-page-card { width: 100%; max-width: 210px; padding-right: 20px; }
.pec-editor .pec-grid .pec-thumb { height: 256px; min-height: 256px; padding: 5px; }
.pec-editor .pec-grid .pec-thumb canvas, .pec-editor .pec-grid .pec-thumb img { max-height: 242px; }
.pec-editor .pec-grid .pec-page-actions { margin-top: -18px; }
.pec-editor .pec-grid .pec-page-label { padding-top: 9px; }
.pec-editor .pec-grid .pec-add-page { position: absolute; top: 112px; right: -20px; margin: 0; }
.pec-editor .pec-grid .pec-page-card.is-selected > .pec-thumb { border-color: #347aff; background: #e4edff; }
.pec-editor .pec-grid-note { grid-column: 1 / -1; margin: -12px 0 0; color: #8090a8; font-size: 12px; }

.pec-editor .pec-search { position: absolute; z-index: 20; top: 12px; right: 17px; display: flex; align-items: center; gap: 4px; width: 380px; max-width: calc(100% - 30px); min-height: 50px; padding: 6px; border: 1px solid #dfe6f1; border-radius: 9px; background: #fff; box-shadow: 0 5px 22px #223f6a21; }
.pec-editor .pec-search input { width: 100%; min-width: 0; height: 34px; padding: 0 9px; border: 0; outline: 0; color: #32445e; font-size: 13px; }
.pec-editor .pec-search input::placeholder { color: #97a4b7; }
.pec-editor .pec-search .pec-icon-only { width: 29px; height: 31px; }
.pec-editor .pec-search .pec-icon-only svg { width: 17px; height: 17px; }
.pec-editor .pec-search-count { flex: none; min-width: 36px; padding-right: 4px; color: #8a97a9; font-size: 11px; text-align: center; }
.pec-editor .pec-toast { position: fixed; z-index: 12060; bottom: 86px; left: 50%; max-width: min(560px, calc(100vw - 40px)); padding: 11px 20px; border: 1px solid #254574; border-radius: 8px; background: #15355d; color: #fff; font-size: 13px; box-shadow: 0 7px 25px #112f572b; transform: translateX(-50%); pointer-events: none; animation: pec-toast-enter .18s ease-out; }
.pec-editor .pec-toast.is-error { border-color: #b7424a; background: #ad3e46; }

.pec-editor .pec-modal-backdrop { position: fixed; z-index: 12050; inset: 0; display: flex; justify-content: center; align-items: center; padding: 24px; background: #0d22495c; backdrop-filter: blur(2px); }
.pec-editor .pec-modal { display: flex; flex-direction: column; width: min(460px, 100%); max-height: calc(100vh - 48px); overflow: hidden; border: 1px solid #e6ebf4; border-radius: 13px; background: #fff; box-shadow: 0 22px 80px #14264640; }
.pec-editor .pec-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 19px 23px 14px; border-bottom: 1px solid #edf0f6; }
.pec-editor .pec-modal-head h2, .pec-editor .pec-modal-head h3 { margin: 0; color: #233752; font-size: 17px; font-weight: 650; }
.pec-editor .pec-modal-head .pec-icon-only { width: 28px; height: 28px; }
.pec-editor .pec-modal-head .pec-icon-only svg { width: 18px; height: 18px; }
.pec-editor .pec-modal-body { min-height: 0; overflow: auto; padding: 19px 23px 7px; color: #63748d; font-size: 13px; }
.pec-editor .pec-modal-body p { margin: 0 0 15px; color: #7a8aa0; font-size: 12px; line-height: 1.7; }
.pec-editor .pec-modal-body label { display: block; margin: 0 0 15px; color: #596c87; font-size: 12px; font-weight: 500; }
.pec-editor .pec-modal-body input[type="text"], .pec-editor .pec-modal-body input[type="number"], .pec-editor .pec-modal-body select, .pec-editor .pec-modal-body textarea { display: block; width: 100%; min-height: 37px; margin-top: 6px; padding: 8px 10px; border: 1px solid #dce4ef; border-radius: 6px; background: #fff; color: #263b57; font-size: 13px; }
.pec-editor .pec-modal-body textarea { min-height: 90px; resize: vertical; }
.pec-editor .pec-modal-body input[type="color"] { display: block; width: 100%; height: 37px; margin-top: 6px; padding: 4px; border: 1px solid #dce4ef; border-radius: 6px; background: #fff; }
.pec-editor .pec-modal-body input[type="range"] { width: 100%; accent-color: #0755f9; }
.pec-editor .pec-modal-body input[type="checkbox"] { margin: 0 7px 0 0; vertical-align: -2px; accent-color: #0755f9; }
.pec-editor .pec-modal-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.pec-editor .pec-modal-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; padding: 15px 23px 21px; }
.pec-editor .pec-modal-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 0 17px; border: 1px solid #dce4ef; border-radius: 6px; background: #fff; color: #586b87; font-size: 13px; }
.pec-editor .pec-modal-actions button:hover { background: #f5f8ff; }
.pec-editor .pec-modal-actions button[type="submit"], .pec-editor .pec-modal-actions .pec-primary { border-color: #0755f9; background: #0755f9; color: #fff; }
.pec-editor .pec-modal-actions button[type="submit"]:hover, .pec-editor .pec-modal-actions .pec-primary:hover { border-color: #0048de; background: #0048de; }
.pec-editor .pec-modal-error { margin: 0 0 12px; padding: 8px 10px; border-radius: 5px; background: #fff0f0; color: #b3424e; font-size: 12px; }
.pec-editor .pec-modal-body input:not([type]), .pec-editor .pec-modal-body input[type="text"] { display: block; width: 100%; min-height: 37px; margin-top: 6px; padding: 8px 10px; border: 1px solid #dce4ef; border-radius: 6px; background: #fff; color: #263b57; }
.pec-editor .pec-sign-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.pec-editor .pec-sign-tabs button, .pec-editor .pec-sign-clear { padding: 7px 13px; border: 1px solid #dce4ef; border-radius: 6px; background: #fff; color: #526887; }
.pec-editor .pec-sign-tabs .is-active { color: #0755f9; background: #edf3ff; border-color: #aac6ff; }
.pec-editor .pec-sign-canvas { display: block; width: 100%; height: 160px; margin-bottom: 12px; border: 1px dashed #b6c7e4; border-radius: 7px; background: #f8faff; touch-action: none; cursor: crosshair; }
.pec-editor .pec-sign-clear { margin-bottom: 12px; font-size: 12px; }
.pec-editor .pec-toolbar-note { margin-left: 15px; color: #8a97ab; white-space: nowrap; font-size: 12px; }
.pec-editor .pec-properties { position: absolute; top: 14px; left: 50%; z-index: 15; min-height: 47px; max-width: calc(100% - 30px); padding: 7px 12px; border: 1px solid #cfddff; border-radius: 7px; background: #fff; box-shadow: 0 4px 15px #18325515; transform: translateX(-50%); overflow-x: auto; }
.pec-editor .pec-processing { position: absolute; z-index: 8; top: 0; right: 0; left: var(--pec-processing-offset); height: 9px; overflow: hidden; border: 1px solid #d9e5f8; background: #f2f6fd; pointer-events: none; }
.pec-editor .pec-processing span { position: absolute; inset: 0; background: repeating-linear-gradient(135deg, #174b91 0 7px, #edf4ff 7px 14px); background-size: 28px 28px; animation: pec-processing-flow .35s linear infinite; }
.pec-editor.pec-pages-mode { --pec-processing-offset: 0px; }
#fileSizeLimitModal { z-index: 13050; }
.pec-editor.pec-busy .pec-mode { pointer-events: none; opacity: .65; }
.pec-editor .pec-page-card.is-drop-before { box-shadow: -4px 0 #0755f9; }
.pec-editor .pec-page-card.is-drop-after { box-shadow: 4px 0 #0755f9; }
.pec-editor .pec-status { max-width: 290px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pec-editor.pec-busy .pec-toolbar button, .pec-editor.pec-busy .pec-page-actions button, .pec-editor.pec-busy .pec-add-page { pointer-events: none; opacity: .4; }
.pec-editor.pec-busy .pec-status::before { display: inline-block; width: 9px; height: 9px; margin-right: 5px; border: 1.5px solid #bed0ec; border-top-color: #3079ff; border-radius: 50%; content: ""; animation: pec-spin .75s linear infinite; }

@keyframes pec-spin { to { transform: rotate(360deg); } }
@keyframes pec-processing-flow { from { background-position: 0 0; } to { background-position: 28px 0; } }
@keyframes pec-menu-enter { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pec-toast-enter { from { opacity: 0; margin-bottom: -5px; } to { opacity: 1; margin-bottom: 0; } }

@media (min-width: 1600px) {
  .pec-editor { --pec-processing-offset: 230px; }
  .pec-editor .pec-top { padding-inline: 27px; }
  .pec-editor .pec-toolbar { gap: 7px; padding-inline: 18px; }
  .pec-editor .pec-tool { padding-inline: 14px; font-size: 14px; }
  .pec-editor .pec-sidebar { flex-basis: 230px; }
  .pec-editor .pec-thumbnails { padding-inline: 23px; }
  .pec-editor .pec-mode { padding-inline: 23px; font-size: 15px; }
}
@media (max-width: 1400px) {
  .pec-editor .pec-toolbar { gap: 4px; padding-inline: 9px; }
  .pec-editor .pec-toolbar .pec-tool { gap: 5px; padding-inline: 9px; font-size: 12px; }
  .pec-editor .pec-toolbar .pec-tool svg { width: 19px; height: 19px; }
  .pec-editor .pec-toolbar .pec-tool svg:last-child:not(:first-child) { width: 11px; height: 11px; margin-left: 0; }
  .pec-editor .pec-toolbar .pec-tool.pec-icon-only { width: 36px; padding: 0; }
  .pec-editor .pec-toolbar .pec-divider { margin-inline: 4px; }
}
@media (max-width: 1200px) {
  .pec-editor .pec-top { grid-template-columns: minmax(160px, 1fr) auto minmax(140px, 1fr); gap: 10px; padding: 0 16px; }
  .pec-editor .pec-mode { gap: 6px; padding: 0 15px; font-size: 13px; }
  .pec-editor .pec-modes { gap: 6px; }
  .pec-editor .pec-filename { max-width: 205px; font-size: 14px; }
  .pec-editor .pec-export { padding: 0 15px; font-size: 13px; }
  .pec-editor .pec-toolbar { gap: 5px; padding-inline: 11px; }
  .pec-editor .pec-tool { gap: 6px; padding-inline: 10px; font-size: 12px; }
  .pec-editor .pec-divider { margin-inline: 4px; }
}
@media (max-width: 1100px) {
  .pec-editor { --pec-processing-offset: 177px; }
  .pec-editor .pec-top { grid-template-columns: minmax(130px, 1fr) auto minmax(120px, 1fr); padding: 0 12px; }
  .pec-editor .pec-logo { flex-basis: 30px; width: 30px; height: 34px; }
  .pec-editor .pec-file { gap: 8px; }
  .pec-editor .pec-filename { max-width: 170px; }
  .pec-editor .pec-mode { height: 40px; padding-inline: 12px; font-size: 12px; }
  .pec-editor .pec-mode svg { width: 18px; height: 18px; }
  .pec-editor .pec-top-actions { gap: 7px; }
  .pec-editor .pec-sidebar { flex-basis: 177px; }
  .pec-editor .pec-thumbnails { padding-inline: 12px; }
  .pec-editor .pec-thumb canvas, .pec-editor .pec-thumb img { max-height: 215px; }
  .pec-editor .pec-grid { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 30px; padding: 25px 30px 40px; }
}
@media (max-width: 860px) {
  .pec-editor { --pec-processing-offset: 150px; }
  .pec-editor .pec-top { display: flex; min-height: 111px; flex-basis: 111px; flex-wrap: wrap; align-content: center; justify-content: space-between; row-gap: 9px; padding: 9px 12px; }
  .pec-editor .pec-file { flex: 1; }
  .pec-editor .pec-filename { max-width: 280px; }
  .pec-editor .pec-modes { order: 3; width: 100%; }
  .pec-editor .pec-mode { flex: 1; height: 36px; max-width: 205px; }
  .pec-editor .pec-export { height: 36px; }
  .pec-editor .pec-close { height: 34px; width: 34px; }
  .pec-editor .pec-sidebar { flex-basis: 150px; }
  .pec-editor .pec-sidebar-head { padding-inline: 12px; }
  .pec-editor .pec-thumbnails { padding-inline: 8px; }
  .pec-editor .pec-thumb { min-height: 140px; }
  .pec-editor .pec-thumb canvas, .pec-editor .pec-thumb img { max-height: 182px; }
  .pec-editor .pec-page-actions { gap: 1px; padding-inline: 3px; }
  .pec-editor .pec-page-actions button { width: 29px; }
  .pec-editor .pec-properties { gap: 8px; overflow-x: auto; padding-inline: 12px; }
  .pec-editor .pec-tool-properties { gap: 8px; padding-inline: 9px; }
  .pec-editor .pec-param-title { display: none; }
}
@media (max-width: 560px) {
  .pec-editor { --pec-processing-offset: 0px; }
  .pec-editor .pec-sidebar { display: none; }
  .pec-editor .pec-filename { max-width: 185px; font-size: 12px; }
  .pec-editor .pec-status { font-size: 10px; }
  .pec-editor .pec-logo { display: none; }
  .pec-editor .pec-mode { gap: 5px; padding: 0 9px; font-size: 11px; }
  .pec-editor .pec-mode svg { width: 16px; height: 16px; }
  .pec-editor .pec-export { gap: 5px; padding-inline: 12px; font-size: 12px; }
  .pec-editor .pec-export svg { width: 17px; height: 17px; }
  .pec-editor .pec-toolbar { min-height: 54px; flex-basis: 54px; padding: 6px 8px; }
  .pec-editor .pec-pager { bottom: 15px; padding-inline: 6px; }
  .pec-editor .pec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 25px 20px; padding: 20px 15px 30px; }
  .pec-editor .pec-grid .pec-page-card { padding-right: 9px; }
  .pec-editor .pec-grid .pec-thumb { height: 215px; min-height: 215px; }
  .pec-editor .pec-grid .pec-thumb canvas, .pec-editor .pec-grid .pec-thumb img { max-height: 201px; }
  .pec-editor .pec-grid .pec-add-page { right: -12px; width: 24px; height: 24px; top: 90px; }
  .pec-editor .pec-properties { max-width: calc(100% - 16px); }
  .pec-editor .pec-properties > span:first-child { display: none; }
  .pec-editor .pec-modal-backdrop { padding: 14px; }
  .pec-editor .pec-modal-head, .pec-editor .pec-modal-body, .pec-editor .pec-modal-actions { padding-inline: 18px; }
  .pec-editor .pec-tool-properties { top: 10px; gap: 6px; min-height: 46px; max-width: calc(100% - 16px); padding: 5px 7px; }
  .pec-editor .pec-param-group { gap: 5px; }
  .pec-editor .pec-param-group input[type="number"] { width: 50px; height: 31px; padding-left: 6px; font-size: 12px; }
  .pec-editor .pec-tool-properties .pec-icon { width: 19px; height: 19px; }
  .pec-editor .pec-param-color { width: 29px; }
  .pec-editor .pec-param-divider { margin: 0; }
}
/* iOS 在 input/select 字号 <16px 时，聚焦会自动放大整个视口（新版 iOS 无视 maximum-scale=1 与 user-scalable=no），触屏设备统一 16px 防止 */
@media (pointer: coarse) {
  .pec-editor input, .pec-editor select, .pec-editor textarea { font-size: 16px !important; }
}
@media (prefers-reduced-motion: reduce) {
  .pec-editor *, .pec-editor *::before, .pec-editor *::after { transition: none !important; animation-duration: .01ms !important; }
  .pec-editor .pec-processing span { animation-duration: .35s !important; }
}
