.image-to-pdf-workspace{
  border:1px solid rgba(37,99,235,.18);
  border-radius:12px;
  overflow:hidden;
  background:linear-gradient(135deg,rgba(255,255,255,.98),rgba(241,248,255,.94));
  box-shadow:0 18px 46px rgba(15,23,42,.08)
}
.image-to-pdf-grid{
  display:grid;
  grid-template-columns:minmax(420px,.92fr) minmax(0,1.08fr)
}
.image-to-pdf-panel{min-width:0}
.image-to-pdf-input-panel{border-right:1px solid rgba(37,99,235,.13)}
.image-to-pdf-panel-header{
  min-height:54px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:0 16px;
  border-bottom:1px solid rgba(37,99,235,.12);
  background:rgba(248,251,255,.92)
}
.image-to-pdf-panel-header>span{
  display:flex;
  align-items:center;
  gap:9px;
  color:#102a43;
  font-weight:900
}
.image-to-pdf-panel-header>span i{color:#0ea5e9}
.image-to-pdf-panel-header button,
.image-to-pdf-panel-header a,
.image-to-pdf-selection-head button,
.image-to-pdf-file-actions button{
  min-height:36px;
  border:1px solid rgba(37,99,235,.18);
  border-radius:6px;
  background:#eef7ff;
  color:#1765d8;
  font-weight:850;
  cursor:pointer;
  text-decoration:none
}
.image-to-pdf-panel-header button,
.image-to-pdf-panel-header a{padding:8px 11px}
.image-to-pdf-panel-header a[hidden]{display:none!important}
.image-to-pdf-drop{
  min-height:132px;
  margin:16px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:7px;
  border:1px dashed rgba(37,99,235,.38);
  border-radius:9px;
  background:linear-gradient(180deg,rgba(255,255,255,.96),rgba(239,248,255,.82));
  color:#526b86;
  text-align:center;
  cursor:pointer;
  transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease
}
.image-to-pdf-drop:hover,
.image-to-pdf-drop.is-dragging{
  border-color:#2563eb;
  box-shadow:0 0 0 4px rgba(37,99,235,.1);
  transform:translateY(-1px)
}
.image-to-pdf-drop input{display:none}
.image-to-pdf-drop i{font-size:31px;color:#2563eb}
.image-to-pdf-drop strong{color:#102a43;font-size:17px}
.image-to-pdf-drop span{font-size:12px;font-weight:750}
.image-to-pdf-selection-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:0 16px 10px
}
.image-to-pdf-selection-head strong,
.image-to-pdf-selection-head span{display:block}
.image-to-pdf-selection-head strong{color:#102a43;font-size:14px}
.image-to-pdf-selection-head span{margin-top:3px;color:#60758a;font-size:11px;font-weight:700}
.image-to-pdf-selection-head button{
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:8px 10px
}
.image-to-pdf-selection-head button:disabled,
.image-to-pdf-file-actions button:disabled{opacity:.45;cursor:not-allowed}
.image-to-pdf-file-list{
  max-height:302px;
  margin:0 16px 14px;
  overflow:auto;
  border:1px solid rgba(37,99,235,.13);
  border-radius:9px;
  background:rgba(255,255,255,.76)
}
.image-to-pdf-file-list>p{
  margin:0;
  padding:22px;
  color:#64748b;
  text-align:center;
  font-size:12px;
  font-weight:750
}
.image-to-pdf-file{
  display:grid;
  grid-template-columns:24px 58px minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  padding:9px 10px;
  border-bottom:1px solid rgba(37,99,235,.1);
  background:#fff;
  transition:opacity .15s ease,background .15s ease
}
.image-to-pdf-file:last-child{border-bottom:0}
.image-to-pdf-file.is-dragging{opacity:.45;background:#eaf3ff}
.image-to-pdf-drag{
  display:flex;
  align-items:center;
  justify-content:center;
  color:#6b7f92;
  cursor:grab
}
.image-to-pdf-file img{
  width:58px;
  height:50px;
  object-fit:contain;
  border:1px solid rgba(15,23,42,.12);
  border-radius:5px;
  background:repeating-conic-gradient(#e2e8f0 0 25%,#fff 0 50%) 50%/14px 14px
}
.image-to-pdf-file strong,
.image-to-pdf-file span{display:block}
.image-to-pdf-file strong{
  overflow:hidden;
  color:#102a43;
  font-size:12px;
  text-overflow:ellipsis;
  white-space:nowrap
}
.image-to-pdf-file span{margin-top:4px;color:#60758a;font-size:10px;font-weight:700}
.image-to-pdf-file-actions{display:flex;gap:5px}
.image-to-pdf-file-actions button{
  width:32px;
  min-height:32px;
  padding:0
}
.image-to-pdf-file-actions button[data-pdf-remove]{color:#b42318;background:#fff5f5}
.image-to-pdf-settings{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin:0 16px 16px
}
.image-to-pdf-settings>label{
  display:flex;
  flex-direction:column;
  gap:7px;
  min-width:0;
  color:#31526f;
  font-size:12px;
  font-weight:850
}
.image-to-pdf-settings select,
.image-to-pdf-settings input[type=color],
.image-to-pdf-settings input[type=number]{
  width:100%;
  min-height:40px;
  border:1px solid rgba(37,99,235,.18);
  border-radius:6px;
  padding:7px 9px;
  background:#fff;
  color:#102a43;
  font-weight:800
}
.image-to-pdf-settings input[type=color]{padding:4px}
.image-to-pdf-margin-setting{grid-column:1/-1}
.image-to-pdf-margin-setting>div{
  display:grid;
  grid-template-columns:minmax(0,1fr) 72px auto;
  align-items:center;
  gap:8px
}
.image-to-pdf-margin-setting input[type=range]{width:100%;accent-color:#2563eb}
.image-to-pdf-margin-setting b{color:#526b86}
.image-to-pdf-preview{
  min-height:620px;
  max-height:calc(100vh - 210px);
  overflow:auto;
  padding:18px;
  background:linear-gradient(180deg,#edf4fb,#dce8f5)
}
.image-to-pdf-empty{
  min-height:560px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:8px;
  border:1px dashed rgba(37,99,235,.28);
  border-radius:9px;
  background:rgba(255,255,255,.72);
  color:#60758a;
  text-align:center
}
.image-to-pdf-empty i{font-size:48px;color:#2563eb}
.image-to-pdf-empty strong{color:#102a43}
.image-to-pdf-empty span{font-size:12px;font-weight:700}
.image-to-pdf-page-stack{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(210px,1fr));
  gap:18px;
  align-items:start
}
.image-to-pdf-page-preview{
  position:relative;
  width:100%;
  aspect-ratio:var(--pdf-page-ratio);
  overflow:hidden;
  border:1px solid rgba(15,23,42,.16);
  border-radius:4px;
  box-shadow:0 12px 28px rgba(15,23,42,.16)
}
.image-to-pdf-page-number{
  position:absolute;
  z-index:2;
  left:8px;
  top:8px;
  padding:5px 7px;
  border-radius:5px;
  background:rgba(15,23,42,.78);
  color:#fff;
  font-size:10px;
  font-weight:850
}
.image-to-pdf-page-inner{
  position:absolute;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden
}
.image-to-pdf-page-inner img{width:100%;height:100%;display:block}
.image-to-pdf-generated object{
  width:100%;
  min-height:540px;
  border:1px solid rgba(15,23,42,.18);
  border-radius:8px;
  background:#fff
}
.image-to-pdf-pdf-fallback{
  min-height:500px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:10px;
  color:#526b86
}
.image-to-pdf-pdf-fallback i{font-size:50px;color:#dc2626}
.image-to-pdf-pdf-fallback a{color:#1765d8;font-weight:850}
.image-to-pdf-result-metrics{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:9px;
  margin-top:12px
}
.image-to-pdf-result-metrics>div{
  padding:11px;
  border:1px solid rgba(37,99,235,.13);
  border-radius:8px;
  background:#fff;
  text-align:center
}
.image-to-pdf-result-metrics b,
.image-to-pdf-result-metrics span{display:block}
.image-to-pdf-result-metrics b{color:#102a43;font-size:13px}
.image-to-pdf-result-metrics span{margin-top:4px;color:#60758a;font-size:10px;font-weight:750}
.image-to-pdf-footer{border-top:1px solid rgba(37,99,235,.13)}
.image-to-pdf-create{
  min-height:40px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:9px 15px;
  border:1px solid #1687e8;
  border-radius:6px;
  background:linear-gradient(135deg,#0ea5e9,#2563eb);
  color:#fff;
  font-weight:900;
  cursor:pointer
}
.image-to-pdf-create:disabled{opacity:.5;cursor:not-allowed}

body.theme-dark .image-to-pdf-workspace{
  background:linear-gradient(135deg,rgba(15,23,42,.98),rgba(17,32,51,.96));
  border-color:rgba(96,165,250,.22)
}
body.theme-dark .image-to-pdf-panel-header,
body.theme-dark .image-to-pdf-file,
body.theme-dark .image-to-pdf-file-list,
body.theme-dark .image-to-pdf-settings select,
body.theme-dark .image-to-pdf-settings input,
body.theme-dark .image-to-pdf-result-metrics>div{
  background:#0f1b2e;
  border-color:rgba(96,165,250,.2)
}
body.theme-dark .image-to-pdf-panel-header>span,
body.theme-dark .image-to-pdf-drop strong,
body.theme-dark .image-to-pdf-selection-head strong,
body.theme-dark .image-to-pdf-file strong,
body.theme-dark .image-to-pdf-settings select,
body.theme-dark .image-to-pdf-settings input,
body.theme-dark .image-to-pdf-result-metrics b{color:#f8fafc}
body.theme-dark .image-to-pdf-drop,
body.theme-dark .image-to-pdf-empty{
  background:rgba(15,27,46,.74);
  border-color:rgba(96,165,250,.28)
}
body.theme-dark .image-to-pdf-preview{background:#091321}
body.theme-dark .image-to-pdf-selection-head span,
body.theme-dark .image-to-pdf-file span,
body.theme-dark .image-to-pdf-settings>label,
body.theme-dark .image-to-pdf-result-metrics span{color:#b9c7d8}

@media(max-width:1100px){
  .image-to-pdf-grid{grid-template-columns:minmax(360px,.9fr) minmax(0,1.1fr)}
  .image-to-pdf-result-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:860px){
  .image-to-pdf-grid{grid-template-columns:1fr}
  .image-to-pdf-input-panel{border-right:0;border-bottom:1px solid rgba(37,99,235,.13)}
  .image-to-pdf-preview{min-height:460px;max-height:none}
  .image-to-pdf-empty{min-height:400px}
}
@media(max-width:620px){
  .image-to-pdf-panel-header{align-items:flex-start;flex-direction:column;padding-top:10px;padding-bottom:10px}
  .image-to-pdf-panel-header button,
  .image-to-pdf-panel-header a{width:100%;text-align:center}
  .image-to-pdf-selection-head{align-items:flex-start;flex-direction:column}
  .image-to-pdf-selection-head button{width:100%;justify-content:center}
  .image-to-pdf-file{grid-template-columns:20px 48px minmax(0,1fr)}
  .image-to-pdf-file img{width:48px;height:44px}
  .image-to-pdf-file-actions{grid-column:1/-1;justify-content:flex-end}
  .image-to-pdf-settings{grid-template-columns:1fr}
  .image-to-pdf-margin-setting{grid-column:auto}
  .image-to-pdf-page-stack{grid-template-columns:1fr}
  .image-to-pdf-result-metrics{grid-template-columns:1fr 1fr}
  .image-to-pdf-footer{align-items:stretch;flex-direction:column;gap:10px}
  .image-to-pdf-create{width:100%}
}
