.nkpdf {
  --nkpdf-ink: #172033;
  --nkpdf-muted: #687385;
  --nkpdf-border: #d9e0ea;
  --nkpdf-bg: #ffffff;
  --nkpdf-soft: #f4f7fb;
  --nkpdf-brand: #185adb;
  --nkpdf-brand-dark: #0f45ad;
  --nkpdf-danger: #b42318;
  --nkpdf-ok: #067647;
  color: var(--nkpdf-ink);
  background: var(--nkpdf-bg);
  border: 1px solid var(--nkpdf-border);
  border-radius: 18px;
  padding: clamp(18px, 3vw, 32px);
  max-width: 980px;
  margin: 24px auto;
  box-shadow: 0 16px 40px rgba(23, 32, 51, .08);
  box-sizing: border-box;
}
.nkpdf * { box-sizing: border-box; }
.nkpdf__header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.nkpdf__title { margin: 0 0 6px; font-size: clamp(22px, 3vw, 32px); line-height: 1.25; }
.nkpdf__lead { margin: 0; color: var(--nkpdf-muted); line-height: 1.7; }
.nkpdf__notice { background: #fff8e5; border: 1px solid #f0d58a; border-radius: 12px; padding: 12px 14px; margin: 16px 0 18px; line-height: 1.7; }
.nkpdf__tabs { display: flex; gap: 8px; background: var(--nkpdf-soft); border: 1px solid var(--nkpdf-border); border-radius: 14px; padding: 6px; margin-bottom: 18px; }
.nkpdf__tab { flex: 1; border: 0; background: transparent; color: var(--nkpdf-muted); padding: 12px 14px; border-radius: 10px; font-weight: 700; cursor: pointer; }
.nkpdf__tab.is-active { background: #fff; color: var(--nkpdf-brand); box-shadow: 0 6px 18px rgba(23, 32, 51, .08); }
.nkpdf__panel { display: none; }
.nkpdf__panel.is-active { display: block; }
.nkpdf__drop { position: relative; border: 2px dashed #aeb9c8; border-radius: 18px; background: linear-gradient(180deg, #fbfdff, #f5f8fc); min-height: 190px; display: flex; align-items: center; justify-content: center; text-align: center; transition: border-color .2s ease, background .2s ease, transform .2s ease; overflow: hidden; }
.nkpdf__drop.is-dragover { border-color: var(--nkpdf-brand); background: #eef5ff; transform: translateY(-1px); }
.nkpdf__file { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.nkpdf__drop-inner { padding: 28px 18px; pointer-events: none; }
.nkpdf__drop-inner strong { display: block; font-size: 18px; margin: 10px 0 5px; }
.nkpdf__drop-inner small { color: var(--nkpdf-muted); }
.nkpdf__drop-icon { display: inline-flex; align-items: center; justify-content: center; width: 66px; height: 66px; border-radius: 18px; background: var(--nkpdf-brand); color: #fff; font-weight: 900; letter-spacing: .03em; }
.nkpdf__fileinfo, .nkpdf__merge-list { margin: 14px 0; padding: 14px; border: 1px solid var(--nkpdf-border); border-radius: 14px; background: #fff; }
.nkpdf__fileinfo strong { display: block; margin-bottom: 4px; }
.nkpdf__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 18px 0; }
.nkpdf__field { display: flex; flex-direction: column; gap: 7px; font-weight: 700; }
.nkpdf__field span { font-size: 14px; color: var(--nkpdf-ink); }
.nkpdf__field input, .nkpdf__field select { width: 100%; min-height: 44px; border: 1px solid var(--nkpdf-border); border-radius: 10px; padding: 9px 12px; background: #fff; color: var(--nkpdf-ink); font-size: 15px; }
.nkpdf__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.nkpdf__btn { appearance: none; border: 1px solid var(--nkpdf-border); background: #fff; color: var(--nkpdf-ink); padding: 11px 18px; border-radius: 999px; font-weight: 800; cursor: pointer; transition: transform .15s ease, background .15s ease, border-color .15s ease; }
.nkpdf__btn:hover { transform: translateY(-1px); border-color: #aeb9c8; }
.nkpdf__btn--primary { background: var(--nkpdf-brand); border-color: var(--nkpdf-brand); color: #fff; }
.nkpdf__btn--primary:hover { background: var(--nkpdf-brand-dark); border-color: var(--nkpdf-brand-dark); }
.nkpdf__status { min-height: 24px; margin-top: 16px; color: var(--nkpdf-muted); line-height: 1.7; }
.nkpdf__status.is-error { color: var(--nkpdf-danger); font-weight: 700; }
.nkpdf__status.is-ok { color: var(--nkpdf-ok); font-weight: 700; }
.nkpdf__merge-item { display: grid; grid-template-columns: 1fr auto auto auto; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--nkpdf-border); }
.nkpdf__merge-item:last-child { border-bottom: 0; }
.nkpdf__merge-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nkpdf__mini { border: 1px solid var(--nkpdf-border); background: var(--nkpdf-soft); border-radius: 8px; padding: 7px 10px; cursor: pointer; font-weight: 700; }
.nkpdf__mini:hover { background: #eaf0f7; }
.nkpdf__size { color: var(--nkpdf-muted); font-size: 13px; white-space: nowrap; }
@media (max-width: 680px) {
  .nkpdf { border-radius: 14px; margin: 14px auto; padding: 16px; }
  .nkpdf__header { display: block; }
  .nkpdf__tabs { flex-direction: column; }
  .nkpdf__grid { grid-template-columns: 1fr; }
  .nkpdf__drop { min-height: 160px; }
  .nkpdf__drop-inner strong { font-size: 16px; }
  .nkpdf__merge-item { grid-template-columns: 1fr auto; }
  .nkpdf__size { grid-column: 1 / -1; }
  .nkpdf__mini { padding: 7px 9px; }
  .nkpdf__actions { flex-direction: column; }
  .nkpdf__btn { width: 100%; }
}
