/* ==========================================================
   FrontHub PDF to Word v61
   Dedicated, isolated layout modeled on PDF Tools
   ========================================================== */

#pw61-backdrop *{box-sizing:border-box}

.pw61-backdrop{
 position:fixed;
 inset:0;
 z-index:999999;
 display:flex;
 align-items:center;
 justify-content:center;
 padding:18px;
 background:rgba(15,23,42,.56);
 backdrop-filter:blur(4px);
}

.pw61-modal{
 position:relative;
 width:min(720px,calc(100vw - 28px));
 max-height:92vh;
 overflow:auto;
 border:1px solid #e4e8f0;
 border-radius:22px;
 background:#fff;
 color:#1e293b;
 box-shadow:0 28px 80px rgba(15,23,42,.24);
}

.pw61-close{
 position:absolute;
 right:16px;
 top:14px;
 z-index:5;
 width:34px;
 height:34px;
 border:1px solid #e5e9f1;
 border-radius:10px;
 background:#fff;
 color:#64748b;
 font-size:22px;
 cursor:pointer;
}

.pw61-head{
 padding:25px 27px 18px;
 border-bottom:1px solid #edf0f5;
}

.pw61-kicker{
 color:#5b63e9;
 font-size:10px;
 font-weight:900;
 letter-spacing:.16em;
}

.pw61-head h2{
 margin:7px 44px 5px 0;
 color:#202b3d;
 font-size:25px;
 font-weight:800;
}

.pw61-head p{
 margin:0;
 color:#738095;
 font-size:12px;
}

.pw61-tabbar{
 padding:14px 20px;
 border-bottom:1px solid #edf0f5;
 background:#fafbfe;
}

.pw61-tab{
 display:inline-flex;
 align-items:center;
 justify-content:center;
 width:165px;
 height:38px;
 border-radius:10px;
 background:linear-gradient(135deg,#6659ef,#339cf3);
 color:#fff;
 font-size:13px;
 font-weight:850;
}

.pw61-body{
 padding:22px 24px 24px;
}

.pw61-credit-summary{
 display:flex;
 align-items:center;
 gap:10px;
 min-height:38px;
 margin-bottom:10px;
 padding:0 12px;
 border:1px solid #e2e7ef;
 border-radius:11px;
 background:#f8faff;
 font-size:11px;
}

.pw61-credit-summary strong{
 color:#4354d4;
}

.pw61-credit-summary em{
 margin-left:auto;
 color:#7b879a;
 font-style:normal;
}

.pw61-credit{
 margin-bottom:12px;
}

.pw61-credit-toggle{
 display:grid;
 grid-template-columns:minmax(0,1fr) auto auto;
 align-items:center;
 gap:10px;
 width:100%;
 min-height:42px;
 padding:0 13px;
 border:1px solid #e1e6ef;
 border-radius:11px;
 background:#f8faff;
 color:#445067;
 font:inherit;
 font-size:11px;
 font-weight:800;
 text-align:left;
 cursor:pointer;
}

.pw61-credit-toggle b{
 padding:4px 8px;
 border-radius:999px;
 background:#eef0ff;
 color:#5561df;
 font-size:10px;
}

.pw61-credit-toggle i{
 color:#7d8899;
 font-style:normal;
 transition:transform .18s;
}

.pw61-credit-toggle.open i{
 transform:rotate(180deg);
}

.pw61-credit-panel{
 margin-top:7px;
 padding:12px 13px;
 border:1px solid #e1e6ef;
 border-radius:11px;
 background:#fff;
}

.pw61-credit-line,
.pw61-credit-op{
 display:flex;
 align-items:flex-start;
 justify-content:space-between;
 gap:14px;
 padding:8px 0;
 border-top:1px solid #edf0f5;
}

.pw61-credit-line:first-child{
 border-top:0;
 padding-top:0;
}

.pw61-credit-line strong,
.pw61-credit-line small,
.pw61-credit-op strong,
.pw61-credit-op small{
 display:block;
}

.pw61-credit-line strong,
.pw61-credit-op strong{
 color:#39465d;
 font-size:10px;
}

.pw61-credit-line small,
.pw61-credit-op small{
 margin-top:3px;
 color:#8994a6;
 font-size:9px;
}

.pw61-credit-line>span,
.pw61-credit-op>span{
 flex:0 0 auto;
 color:#4e59cf;
 font-size:10px;
 font-weight:850;
}

.pw61-credit-total{
 display:flex;
 justify-content:space-between;
 gap:12px;
 padding-top:10px;
 border-top:1px solid #dfe5ed;
 color:#2d394d;
 font-size:11px;
}

.pw61-credit-total strong{
 color:#3546c5;
}

.pw61-warning{
 margin-top:10px;
 padding:10px 11px;
 border:1px solid #f0cccc;
 border-radius:9px;
 background:#fff2f2;
 color:#aa291f;
 font-size:10px;
 line-height:1.45;
}

.pw61-drop{
 display:flex;
 flex-direction:column;
 align-items:center;
 justify-content:center;
 width:100%;
 min-height:145px;
 padding:24px;
 border:1.5px dashed #cbd4e3;
 border-radius:16px;
 background:#fafcff;
 text-align:center;
 cursor:pointer;
}

.pw61-drop.drag,
.pw61-drop:hover{
 border-color:#6874eb;
 background:#f6f7ff;
}

.pw61-pdf-icon{
 display:flex;
 align-items:center;
 justify-content:center;
 width:46px;
 height:46px;
 margin:0 0 10px;
 border-radius:13px;
 background:#eef0ff;
 color:#5863e8;
 font-size:11px;
 font-weight:900;
}

.pw61-drop strong{
 color:#273247;
 font-size:14px;
}

.pw61-drop small{
 margin-top:5px;
 color:#8490a3;
 font-size:11px;
}

.pw61-files{
 display:grid;
 gap:7px;
 margin-top:12px;
}

.pw61-file-row{
 display:grid;
 grid-template-columns:38px minmax(0,1fr) 32px;
 align-items:center;
 gap:9px;
 padding:8px 9px;
 border:1px solid #e6eaf1;
 border-radius:11px;
 background:#fff;
}

.pw61-file-icon{
 display:flex;
 align-items:center;
 justify-content:center;
 width:34px;
 height:34px;
 border-radius:8px;
 background:#fff1f1;
 color:#d74646;
 font-size:9px;
 font-weight:900;
}

.pw61-file-row strong,
.pw61-file-row small{
 display:block;
}

.pw61-file-row strong{
 overflow:hidden;
 color:#354157;
 font-size:10px;
 text-overflow:ellipsis;
 white-space:nowrap;
}

.pw61-file-row small{
 margin-top:2px;
 color:#8a95a6;
 font-size:9px;
}

.pw61-file-row button{
 border:0;
 background:transparent;
 color:#94a0b2;
 font-size:19px;
 cursor:pointer;
}

.pw61-progress-wrap{
 margin-top:15px;
}

.pw61-progress-head{
 display:flex;
 justify-content:space-between;
 gap:12px;
 margin-bottom:6px;
 color:#596477;
 font-size:10px;
}

.pw61-progress{
 height:8px;
 overflow:hidden;
 border-radius:999px;
 background:#e9edf4;
}

.pw61-progress i{
 display:block;
 width:0;
 height:100%;
 border-radius:inherit;
 background:linear-gradient(90deg,#6659ef,#38a0ed);
 transition:width .28s;
}

.pw61-error{
 margin-top:14px;
 padding:10px 12px;
 border-radius:9px;
 background:#fff0f0;
 color:#b42318;
 font-size:11px;
}

.pw61-ready{
 align-items:center;
 justify-content:space-between;
 gap:14px;
 margin-top:16px;
 padding:13px 14px;
 border:1px solid #d8e3db;
 border-radius:12px;
 background:#f4fbf6;
}

.pw61-ready strong,
.pw61-ready span{
 display:block;
}

.pw61-ready span{
 margin-top:3px;
 color:#62776a;
 font-size:10px;
}

.pw61-ready button{
 height:39px;
 padding:0 16px;
 border:0;
 border-radius:10px;
 background:#39a66f;
 color:#fff;
 font-weight:850;
 cursor:pointer;
}

.pw61-actions{
 display:flex;
 justify-content:flex-end;
 gap:8px;
 margin-top:18px;
}

.pw61-actions button{
 height:39px;
 padding:0 15px;
 border-radius:10px;
 font-weight:850;
 cursor:pointer;
}

.pw61-secondary{
 border:1px solid #dce2eb;
 background:#fff;
 color:#596477;
}

.pw61-primary{
 border:0;
 background:linear-gradient(135deg,#6659ef,#339cf3);
 color:#fff;
}

.pw61-primary:disabled{
 opacity:.55;
 cursor:not-allowed;
}

/* dark mode */
html[data-theme="dark"] .pw61-modal,
html.dark .pw61-modal,
body.dark .pw61-modal{
 border-color:#303b4d;
 background:#111823;
 color:#e6edf7;
}

html[data-theme="dark"] .pw61-head,
html.dark .pw61-head,
body.dark .pw61-head{
 border-color:#303b4d;
}

html[data-theme="dark"] .pw61-head h2,
html.dark .pw61-head h2,
body.dark .pw61-head h2{
 color:#eef3fb;
}

html[data-theme="dark"] .pw61-credit-summary,
html[data-theme="dark"] .pw61-credit-toggle,
html.dark .pw61-credit-summary,
html.dark .pw61-credit-toggle,
body.dark .pw61-credit-summary,
body.dark .pw61-credit-toggle{
 border-color:#303b4d;
 background:#161e2a;
 color:#e6edf7;
}

html[data-theme="dark"] .pw61-credit-panel,
html[data-theme="dark"] .pw61-file-row,
html.dark .pw61-credit-panel,
html.dark .pw61-file-row,
body.dark .pw61-credit-panel,
body.dark .pw61-file-row{
 border-color:#303b4d;
 background:#111823;
 color:#e6edf7;
}

@media(max-width:620px){
 .pw61-credit-summary{
  flex-wrap:wrap;
  padding:9px 12px;
 }
 .pw61-credit-summary em{
  width:100%;
  margin-left:0;
 }
}