/* Utilix — PDF Merge (pdfm-) */
:root { --pdfm-accent: #e11d48; --pdfm-accent-light: #fff1f2; --pdfm-accent-dark: #be123c; }

.pdfm-hero { padding-bottom: 40px; }
.pdfm-hero__grid { display: grid; grid-template-columns: 1fr 340px; gap: 40px; align-items: center; }
.pdfm-hero__main { display: flex; gap: 20px; align-items: flex-start; }
.pdfm-hero__stack { display: flex; align-items: center; gap: 12px; justify-content: center; flex-wrap: wrap; }
.pdfm-hero__doc { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 72px; padding: 14px 8px; font-size: .625rem; font-weight: 700; color: #64748b; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 4px 12px rgba(15,23,42,.08); }
.pdfm-hero__doc i { width: 28px; height: 28px; color: #ef4444; }
.pdfm-hero__doc--2 { transform: translateY(-8px); }
.pdfm-hero__doc--3 { transform: translateY(-16px); }
.pdfm-hero__arrow { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; color: #fff; background: var(--pdfm-accent); border-radius: 50%; }
.pdfm-hero__merged { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 88px; padding: 16px 10px; font-size: .6875rem; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--pdfm-accent), #f43f5e); border-radius: 12px; box-shadow: 0 8px 24px rgba(225,29,72,.35); }
.pdfm-hero__merged i { width: 32px; height: 32px; }

.pdfm-main { padding: 0 0 48px; }
.pdfm-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.pdfm-workspace { display: flex; flex-direction: column; gap: 20px; }

.pdfm-step-card { background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 24px; box-shadow: 0 4px 24px rgba(15,23,42,.05); }
.pdfm-step-card__head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.pdfm-step-card__head--between { justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.pdfm-step-card__head-left { display: flex; align-items: center; gap: 12px; }
.pdfm-step-card__head h2 { margin: 0; font-size: 1.0625rem; font-weight: 700; color: var(--heading); }
.pdfm-step-card__num { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; font-size: .875rem; font-weight: 800; color: #fff; background: var(--pdfm-accent); border-radius: 10px; flex-shrink: 0; }

.pdfm-dropzone { border: 2px dashed #fecdd3; border-radius: 16px; background: #fffbfb; cursor: pointer; transition: border-color .2s, background .2s; }
.pdfm-dropzone.is-dragover, .pdfm-dropzone:hover { border-color: var(--pdfm-accent); background: #fff1f2; }
.pdfm-dropzone__inner { display: flex; flex-direction: column; align-items: center; padding: 36px 24px; text-align: center; }
.pdfm-dropzone__icon { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; margin-bottom: 16px; color: var(--pdfm-accent); background: var(--pdfm-accent-light); border-radius: 16px; }
.pdfm-dropzone__title { margin: 0 0 8px; font-size: 1rem; font-weight: 600; }
.pdfm-dropzone__or { font-size: .8125rem; color: #94a3b8; margin-bottom: 16px; }
.pdfm-dropzone__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 12px; }
.pdfm-dropzone__hint { margin: 0; font-size: .75rem; color: #94a3b8; }

.pdfm-arrange-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.pdfm-file-list-wrap { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.pdfm-file-list { list-style: none; margin: 0; padding: 0; }
.pdfm-file-item { display: grid; grid-template-columns: auto auto 1fr auto auto; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); background: #fff; transition: background .15s; }
.pdfm-file-item:last-child { border-bottom: none; }
.pdfm-file-item.is-dragging { opacity: .5; background: #fff1f2; }
.pdfm-file-item.is-drag-over { background: #fff1f2; border-top: 2px solid var(--pdfm-accent); }
.pdfm-file-item__handle { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; color: #94a3b8; cursor: grab; border-radius: 6px; }
.pdfm-file-item__handle:active { cursor: grabbing; }
.pdfm-file-item__num { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; font-size: .75rem; font-weight: 700; color: #64748b; background: #f1f5f9; border-radius: 8px; }
.pdfm-file-item__icon { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; color: #ef4444; background: #fef2f2; border-radius: 10px; flex-shrink: 0; }
.pdfm-file-item__meta { min-width: 0; }
.pdfm-file-item__name { display: block; font-size: .875rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdfm-file-item__sub { font-size: .75rem; color: #94a3b8; }
.pdfm-file-item__pages { font-size: .8125rem; font-weight: 600; color: #64748b; white-space: nowrap; }
.pdfm-file-item__remove { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; color: #94a3b8; background: transparent; border: none; border-radius: 8px; cursor: pointer; transition: color .15s, background .15s; }
.pdfm-file-item__remove:hover { color: #ef4444; background: #fef2f2; }
.pdfm-empty-msg { margin: 0; padding: 32px 16px; text-align: center; font-size: .875rem; color: #94a3b8; }
.pdfm-list-footer { display: flex; justify-content: space-between; margin-top: 12px; font-size: .8125rem; font-weight: 600; color: #64748b; }

.pdfm-options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.pdfm-field label, .pdfm-field__label { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: .8125rem; font-weight: 600; }
.pdfm-field--full { grid-column: 1 / -1; }
.pdfm-field__hint { margin: 8px 0 0; font-size: .75rem; color: #94a3b8; }
.pdfm-info-btn { display: inline-flex; padding: 0; color: #94a3b8; background: none; border: none; cursor: help; }
.pdfm-select { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 12px; background: #fff; font-size: .875rem; }

.pdfm-radio-group { display: flex; flex-wrap: wrap; gap: 16px; }
.pdfm-radio { display: flex; align-items: center; gap: 8px; font-size: .875rem; cursor: pointer; }
.pdfm-radio input { position: absolute; opacity: 0; pointer-events: none; }
.pdfm-radio__mark { width: 18px; height: 18px; border: 2px solid #cbd5e1; border-radius: 50%; position: relative; flex-shrink: 0; transition: border-color .15s; }
.pdfm-radio input:checked + .pdfm-radio__mark { border-color: var(--pdfm-accent); }
.pdfm-radio input:checked + .pdfm-radio__mark::after { content: ''; position: absolute; inset: 3px; background: var(--pdfm-accent); border-radius: 50%; }

.pdfm-checkbox { display: flex; align-items: center; gap: 10px; font-size: .875rem; cursor: pointer; }
.pdfm-checkbox input { position: absolute; opacity: 0; pointer-events: none; }
.pdfm-checkbox__mark { display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; border: 2px solid #cbd5e1; border-radius: 6px; flex-shrink: 0; transition: background .15s, border-color .15s; }
.pdfm-checkbox__mark i { width: 14px; height: 14px; color: #fff; opacity: 0; }
.pdfm-checkbox input:checked + .pdfm-checkbox__mark { background: var(--pdfm-accent); border-color: var(--pdfm-accent); }
.pdfm-checkbox input:checked + .pdfm-checkbox__mark i { opacity: 1; }

.pdfm-ranges { display: flex; flex-direction: column; gap: 10px; }
.pdfm-range-row { display: grid; grid-template-columns: 1fr 1.5fr; gap: 10px; align-items: center; }
.pdfm-range-row label { margin: 0; font-size: .75rem; font-weight: 600; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdfm-range-row input { padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: .8125rem; background: #fff; }

.pdfm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; font-size: .875rem; font-weight: 600; border-radius: 12px; border: 1px solid transparent; cursor: pointer; transition: background .15s, opacity .15s; }
.pdfm-btn--primary { color: #fff; background: var(--pdfm-accent); }
.pdfm-btn--primary:hover { background: var(--pdfm-accent-dark); }
.pdfm-btn--outline { color: #475569; background: #fff; border-color: var(--border); }
.pdfm-btn--outline:hover { border-color: var(--pdfm-accent); color: var(--pdfm-accent); }
.pdfm-btn--ghost { color: #475569; background: transparent; border-color: transparent; }
.pdfm-btn--danger { color: var(--pdfm-accent); }
.pdfm-btn--danger:hover { background: #fff1f2; }
.pdfm-btn--sm { padding: 8px 14px; font-size: .8125rem; }
.pdfm-btn--merge { width: 100%; padding: 16px 24px; font-size: 1rem; color: #fff; background: linear-gradient(135deg, var(--pdfm-accent), #f43f5e); border: none; border-radius: 14px; box-shadow: 0 8px 24px rgba(225,29,72,.3); }
.pdfm-btn--merge:disabled { opacity: .5; cursor: not-allowed; }
.pdfm-security-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 12px 0 0; font-size: .8125rem; color: #94a3b8; text-align: center; }

.pdfm-progress { margin-top: 16px; padding: 12px; background: #f8fafc; border-radius: 12px; border: 1px solid var(--border); }
.pdfm-progress__bar { height: 6px; width: 0; background: linear-gradient(90deg, var(--pdfm-accent), #f43f5e); border-radius: 100px; transition: width .3s; }
.pdfm-progress__text { display: block; margin-top: 8px; font-size: .75rem; font-weight: 600; color: #64748b; text-align: center; }

.pdfm-result-head { margin-bottom: 20px; }
.pdfm-result-head__left { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.pdfm-result-head__left h2 { margin: 0; font-size: 1.0625rem; font-weight: 700; }
.pdfm-ready-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; font-size: .6875rem; font-weight: 700; color: #16a34a; background: #dcfce7; border-radius: 100px; }
.pdfm-ready-badge--sm { font-size: .625rem; padding: 2px 8px; }
.pdfm-result-body { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: start; }
.pdfm-result-icon { position: relative; width: 100px; height: 120px; display: flex; align-items: center; justify-content: center; }
.pdfm-result-icon__doc { display: flex; align-items: center; justify-content: center; width: 80px; height: 100px; color: #ef4444; background: #fef2f2; border: 1px solid #fecdd3; border-radius: 12px; }
.pdfm-result-icon__doc i { width: 40px; height: 40px; }
.pdfm-result-icon__check { position: absolute; bottom: 0; right: 0; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; color: #16a34a; background: #dcfce7; border-radius: 50%; border: 2px solid #fff; }
.pdfm-result-info__name { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.pdfm-result-info__name strong { font-size: 1rem; }
.pdfm-info-table { margin: 0 0 20px; }
.pdfm-info-table__row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: .8125rem; }
.pdfm-info-table__row dt { color: #94a3b8; }
.pdfm-info-table__row dd { margin: 0; font-weight: 600; text-align: right; }
.pdfm-saved-badge { display: inline-block; padding: 2px 6px; font-size: .625rem; font-weight: 700; color: #16a34a; background: #dcfce7; border-radius: 4px; margin-left: 4px; }
.pdfm-result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.pdfm-start-over { display: inline-flex; align-items: center; gap: 6px; padding: 0; font-size: .8125rem; font-weight: 600; color: #64748b; background: none; border: none; cursor: pointer; }
.pdfm-start-over:hover { color: var(--pdfm-accent); }

.pdfm-sidebar { display: flex; flex-direction: column; gap: 16px; }
.pdfm-side-card { padding: 20px; background: #fff; border: 1px solid var(--border); border-radius: 20px; }
.pdfm-side-card__title { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; font-size: .9375rem; font-weight: 700; }
.pdfm-how-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.pdfm-how-list li { display: flex; gap: 12px; font-size: .8125rem; color: #475569; line-height: 1.5; }
.pdfm-how-list li span { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; font-size: .75rem; font-weight: 700; color: #fff; background: var(--pdfm-accent); border-radius: 50%; flex-shrink: 0; }
.pdfm-why-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pdfm-why-list li { display: flex; gap: 8px; font-size: .8125rem; color: #475569; line-height: 1.5; }
.pdfm-why-list li i { color: var(--pdfm-accent); flex-shrink: 0; margin-top: 2px; }
.pdfm-feat-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pdfm-feat-list li { display: flex; align-items: center; gap: 10px; font-size: .8125rem; color: #475569; }
.pdfm-feat-icon { display: flex; width: 32px; height: 32px; align-items: center; justify-content: center; border-radius: 8px; flex-shrink: 0; }
.pdfm-feat-icon--blue { background: #dbeafe; color: #2563eb; }
.pdfm-feat-icon--purple { background: #ede9fe; color: #7c3aed; }
.pdfm-feat-icon--green { background: #dcfce7; color: #16a34a; }
.pdfm-feat-icon--orange { background: #ffedd5; color: #ea580c; }
.pdfm-feat-icon--red { background: #fee2e2; color: #ef4444; }
.pdfm-tools-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pdfm-tools-link { display: flex; align-items: center; gap: 10px; padding: 10px 12px; font-size: .8125rem; color: #475569; text-decoration: none; background: #f8fafc; border: 1px solid var(--border); border-radius: 12px; }
.pdfm-tools-link:hover { color: var(--pdfm-accent); background: var(--pdfm-accent-light); }
.pdfm-tools-link--soon { opacity: .7; cursor: default; }
.pdfm-tools-link--soon em { margin-left: auto; font-size: .625rem; font-weight: 700; font-style: normal; color: #94a3b8; text-transform: uppercase; }
.pdfm-tools-link__icon { display: flex; width: 32px; height: 32px; align-items: center; justify-content: center; color: var(--pdfm-accent); background: #fff; border-radius: 8px; flex-shrink: 0; }

.pdfm-features { padding: 48px 0; background: #f8fafc; }
.pdfm-features__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.pdfm-feature-card { padding: 24px; background: #fff; border: 1px solid var(--border); border-radius: 20px; }
.pdfm-feature-card__icon { display: flex; width: 48px; height: 48px; align-items: center; justify-content: center; margin-bottom: 16px; border-radius: 14px; }
.pdfm-feature-card__icon--red { background: #fee2e2; color: #ef4444; }
.pdfm-feature-card__icon--green { background: #dcfce7; color: #16a34a; }
.pdfm-feature-card__icon--blue { background: #dbeafe; color: #2563eb; }
.pdfm-feature-card__icon--purple { background: #ede9fe; color: #7c3aed; }

.pdfm-steps-section { padding: 56px 0; }
.pdfm-section-head--center { text-align: center; margin-bottom: 40px; }
.pdfm-section-eyebrow { display: inline-flex; gap: 6px; margin-bottom: 12px; padding: 6px 14px; font-size: .75rem; font-weight: 700; color: var(--pdfm-accent); background: var(--pdfm-accent-light); border-radius: 100px; }
.pdfm-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; list-style: none; margin: 0; padding: 0; }
.pdfm-step { position: relative; padding: 24px 20px; background: #fff; border: 1px solid var(--border); border-radius: 20px; text-align: center; }
.pdfm-step__num { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 800; color: #fff; background: var(--pdfm-accent); border-radius: 50%; }
.pdfm-step__icon { display: flex; width: 48px; height: 48px; margin: 8px auto 12px; align-items: center; justify-content: center; color: var(--pdfm-accent); background: var(--pdfm-accent-light); border-radius: 14px; }
.pdfm-faq { padding: 56px 0; }

.pdfm-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px); padding: 12px 24px; font-size: .875rem; font-weight: 600; color: #fff; background: #1e293b; border-radius: 12px; opacity: 0; transition: transform .3s, opacity .3s; z-index: 9999; pointer-events: none; max-width: 90vw; text-align: center; }
.pdfm-toast--show { transform: translateX(-50%) translateY(0); opacity: 1; }

.pdfm-animate-in { opacity: 0; transform: translateY(16px); transition: opacity .5s, transform .5s; }
.pdfm-animate-in.is-visible { opacity: 1; transform: translateY(0); }
.pdfm-animate-in--delay { transition-delay: .1s; }
.pdfm-animate-in--delay2 { transition-delay: .2s; }
.pdfm-animate-in--delay3 { transition-delay: .3s; }

@media (max-width: 1024px) {
    .pdfm-hero__grid, .pdfm-layout { grid-template-columns: 1fr; }
    .pdfm-hero__visual { display: none; }
    .pdfm-options-grid, .pdfm-result-body { grid-template-columns: 1fr; }
    .pdfm-features__grid, .pdfm-steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .pdfm-features__grid, .pdfm-steps { grid-template-columns: 1fr; }
    .pdfm-file-item { grid-template-columns: auto 1fr auto; }
    .pdfm-file-item__num, .pdfm-file-item__pages { display: none; }
    .pdfm-range-row { grid-template-columns: 1fr; }
}

/* Dark mode */
[data-theme="dark"] .pdfm-step-card,
[data-theme="dark"] .pdfm-side-card,
[data-theme="dark"] .pdfm-feature-card,
[data-theme="dark"] .pdfm-step,
[data-theme="dark"] .pdfm-file-item { background: var(--bg-section); border-color: var(--border); }
[data-theme="dark"] .pdfm-dropzone { background: #1a2332; border-color: #4c1d2e; }
[data-theme="dark"] .pdfm-dropzone.is-dragover,
[data-theme="dark"] .pdfm-dropzone:hover { background: #2a1520; border-color: var(--pdfm-accent); }
[data-theme="dark"] .pdfm-select,
[data-theme="dark"] .pdfm-btn--outline,
[data-theme="dark"] .pdfm-range-row input { background: #1a2332; border-color: var(--border); color: #e2e8f0; }
[data-theme="dark"] .pdfm-file-list-wrap { border-color: var(--border); }
[data-theme="dark"] .pdfm-file-item__num { background: #243044; color: #94a3b8; }
[data-theme="dark"] .pdfm-file-item__icon { background: rgba(239,68,68,.12); }
[data-theme="dark"] .pdfm-progress,
[data-theme="dark"] .pdfm-tools-link { background: #1a2332; border-color: var(--border); }
[data-theme="dark"] .pdfm-features { background: var(--bg); }
[data-theme="dark"] .pdfm-ready-badge,
[data-theme="dark"] .pdfm-saved-badge { background: rgba(34,197,94,.15); color: #4ade80; }
[data-theme="dark"] .pdfm-result-icon__doc { background: rgba(239,68,68,.12); border-color: #4c1d2e; }
[data-theme="dark"] .pdfm-hero__doc { background: var(--bg-section); }
[data-theme="dark"] .pdfm-toast { background: #334155; }
[data-theme="dark"] .pdfm-radio__mark,
[data-theme="dark"] .pdfm-checkbox__mark { border-color: #475569; }
