/* Bindery — batch PDF merger styles */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: #0b0e1a;
  color: #e8ecf8;
  min-height: 100vh;
}
.wrap { max-width: 780px; margin: 0 auto; padding: 40px 20px 60px; }

.head { margin-bottom: 28px; }
.head__mark { display: flex; gap: 5px; margin-bottom: 14px; }
.head__mark span { width: 26px; height: 6px; border-radius: 3px; background: #f43f5e; opacity: .85; }
.head__mark span:nth-child(2) { background: #fb923c; transform: translateY(-4px); }
.head__mark span:nth-child(3) { background: #facc15; transform: translateY(-8px); }
.head__title { font-family: 'Fraunces', serif; font-size: 2.2rem; font-weight: 600; letter-spacing: -0.02em; }
.head__tag { color: #9aa3c0; font-size: .95rem; margin-top: 8px; line-height: 1.55; }

.dropzone {
  border: 2px dashed rgba(255,255,255,.14);
  border-radius: 16px;
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.dropzone:hover, .dropzone.dragover { border-color: #f43f5e; background: rgba(244,63,94,.06); }
.dropzone__icon { color: #6b7597; margin-bottom: 12px; }
.dropzone.dragover .dropzone__icon { color: #f43f5e; }
.dropzone__title { font-size: 1rem; font-weight: 500; }
.dropzone__hint { color: #6b7597; font-size: .82rem; margin-top: 6px; }

.link-btn { background: none; border: none; color: #fb7185; cursor: pointer; font: inherit; text-decoration: underline; padding: 0; }

.stack-section { margin-top: 24px; }
.stack-section__bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; flex-wrap: wrap; gap: 10px; }
.count-label { font-family: 'JetBrains Mono', monospace; font-size: .85rem; color: #9aa3c0; }
.bar-actions { display: flex; gap: 8px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; border: none; cursor: pointer;
  font: inherit; font-weight: 600; font-size: .88rem;
  padding: 10px 18px;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn--ghost { background: rgba(255,255,255,.06); color: #cbd3ea; border: 1px solid rgba(255,255,255,.1); }
.btn--ghost:hover { background: rgba(255,255,255,.1); }
.btn--primary {
  background: linear-gradient(135deg, #f43f5e, #fb923c);
  color: #fff; padding: 13px 30px; font-size: .95rem;
  box-shadow: 0 6px 22px rgba(244,63,94,.35);
}
.btn--primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 9px 28px rgba(244,63,94,.45); }
.btn--primary:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }

.stack-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.stack-item {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center; gap: 10px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: .88rem;
}
.stack-item.is-dragging { opacity: .35; }
.stack-item.drag-over { border-color: #f43f5e; }
.item-order { font-family: 'JetBrains Mono', monospace; color: #6b7597; font-size: .78rem; min-width: 26px; }
.item-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #dbe2f5; }
.item-meta { font-family: 'JetBrains Mono', monospace; color: #6b7597; font-size: .75rem; white-space: nowrap; }
.item-actions { display: flex; gap: 4px; }
.icon-btn {
  background: none; border: 1px solid transparent; border-radius: 6px;
  color: #6b7597; cursor: pointer; font-size: .85rem;
  width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.icon-btn:hover { color: #fff; background: rgba(255,255,255,.08); }
.icon-btn.remove:hover { color: #fb7185; }

.merge-bar {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 22px; gap: 16px; flex-wrap: wrap;
}
.page-total { font-family: 'JetBrains Mono', monospace; font-size: .95rem; color: #e8ecf8; }
.size-total { font-family: 'JetBrains Mono', monospace; font-size: .78rem; color: #6b7597; margin-top: 2px; }

.progress { margin-top: 18px; }
.progress__track { height: 8px; border-radius: 999px; background: rgba(255,255,255,.07); overflow: hidden; }
.progress__fill { height: 100%; width: 0%; border-radius: 999px; background: linear-gradient(90deg,#f43f5e,#fb923c); transition: width .25s; }
.progress__label { font-size: .8rem; color: #9aa3c0; margin-top: 8px; }

.error-box {
  margin-top: 18px;
  background: rgba(244,63,94,.1);
  border: 1px solid rgba(244,63,94,.35);
  color: #fda4af;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: .86rem;
}

.foot { margin-top: 44px; color: #586180; font-size: .78rem; text-align: center; line-height: 1.6; }

@media (max-width: 560px) {
  .head__title { font-size: 1.7rem; }
  .dropzone { padding: 32px 14px; }
  .merge-bar { flex-direction: column; align-items: stretch; }
  .btn--primary { width: 100%; }
}
