#pdf-split-ui {
    max-width: 980px;
    margin: 0 auto;
    padding: 2rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    font-family: 'Segoe UI', system-ui, sans-serif;
}

.split-section { text-align: center; }
.split-section h3, .split-section h4 { color: #2c3e50; margin-bottom: 1rem; }

#split-drop-zone {
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 1rem;
    transition: all 0.25s ease;
}

#split-drop-zone.split-drag {
    border-color: #4e73df;
    background: #f8f9ff;
}

.split-icon { font-size: 48px; margin-bottom: 1rem; }
.split-icon-ok { color: #28a745; }

#split-drop-zone p { color: #7f8c8d; margin-bottom: 1rem; }
.split-hint { color: #95a5a6; font-size: 14px; margin-top: 0.5rem; }
.split-filename { color: #4e73df; font-weight: 600; margin-top: 0.5rem; }

#pdf-upload { display: none; }

.split-btn {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s ease;
    text-decoration: none;
}

.split-btn-primary { background: #4e73df; color: #fff; }
.split-btn-primary:hover { background: #3d5fc4; }
.split-btn-secondary { background: #eef2ff; color: #334155; margin: 4px 2px; }
.split-btn-secondary:hover { background: #dbe4ff; }
.split-btn-success { background: #28a745; color: #fff; }

.split-link-btn {
    background: none;
    border: none;
    color: #4e73df;
    cursor: pointer;
    text-decoration: underline;
    font-size: 14px;
    margin-top: 12px;
}

.split-mode-tabs {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.split-mode-tab {
    padding: 8px 16px;
    border: 1px solid #dbe4ff;
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    color: #475569;
}

.split-mode-tab.is-active {
    background: #4e73df;
    border-color: #4e73df;
    color: #fff;
}

.split-mode-panel { text-align: left; margin-bottom: 1rem; }

.split-presets {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.split-presets-label { color: #64748b; font-size: 14px; }

.range-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.range-input {
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    min-width: 140px;
    font-size: 14px;
}

.remove-range {
    width: 32px;
    height: 32px;
    border: 1px solid #fecaca;
    border-radius: 6px;
    background: #fff;
    color: #dc2626;
    cursor: pointer;
}

.split-fixed-label {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: #475569;
    font-size: 14px;
    margin-bottom: 12px;
}

.split-fixed-input {
    width: 72px;
    padding: 8px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    text-align: center;
}

.split-page-info {
    text-align: left;
    color: #64748b;
    font-size: 14px;
    margin: 1rem 0;
}

.split-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 1.5rem;
}

.thumb-wrapper {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px;
    text-align: center;
    background: #fff;
    transition: opacity 0.2s ease;
}

.thumb-wrapper.inactive { opacity: 0.35; }

.page-thumb {
    display: block;
    max-width: 120px;
    height: auto;
    margin: 0 auto;
}

.page-label {
    font-size: 12px;
    margin-top: 6px;
    color: #64748b;
    font-weight: 600;
}

.range-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    border: 2px dashed #4ade80;
    border-radius: 10px;
    margin-bottom: 12px;
    width: 100%;
    background: #f0fdf4;
}

.range-group::before {
    content: 'Диапазон ' attr(data-group);
    width: 100%;
    font-size: 12px;
    font-weight: 700;
    color: #15803d;
    margin-bottom: 4px;
}

.split-actions { margin-top: 1rem; }

.split-progress-track {
    height: 8px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    margin: 1rem auto;
    max-width: 420px;
}

#split-progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #4e73df, #28a745);
    transition: width 0.15s ease;
}

#split-progress-status { color: #64748b; font-size: 14px; }

.split-result-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.split-status {
    margin-top: 1rem;
    color: #374151;
    font-size: 14px;
}

.split-status-error { color: #dc2626; }

@media (max-width: 640px) {
    #pdf-split-ui { padding: 1rem; }
    .split-result-item { flex-direction: column; align-items: stretch; }
}
