.split-page {
    padding: 54px 0 90px;
}

.split-title {
    max-width: 780px;
    margin-bottom: 32px;
}

.split-title h1 {
    margin: 0;
    font-size: 42px;
    line-height: 1.15;
    letter-spacing: -1.5px;
}

.split-title p {
    margin: 16px 0 0;
    color: #6c7178;
    font-size: 16px;
    line-height: 1.75;
}


/* Upload */

.upload-area {
    min-height: 410px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 45px 25px;

    background: #fff;

    border: 2px dashed #d4d8de;
    border-radius: 22px;

    text-align: center;
}

.upload-area.drag-over {
    border-color: #202124;
    background: #f4f5f7;
}

.upload-icon {
    width: 76px;
    height: 76px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 20px;

    border-radius: 22px;

    background: #f1f3f4;

    font-size: 36px;
}

.upload-area h2 {
    margin: 0;
    font-size: 23px;
}

.upload-area p {
    margin: 11px 0 24px;
    color: #777c84;
    font-size: 14px;
}

.primary-btn,
.secondary-btn,
.add-range-btn,
.split-btn {
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
}

.primary-btn {
    padding: 13px 24px;

    border: 0;
    border-radius: 11px;

    background: #202124;
    color: #fff;

    font-size: 15px;
}

.secondary-btn {
    padding: 10px 15px;

    border: 1px solid #d8dce1;
    border-radius: 9px;

    background: #fff;
    color: #34373b;
}


/* Workspace */

.workspace {
    overflow: hidden;

    background: #fff;

    border: 1px solid #e2e5e9;
    border-radius: 20px;
}

.workspace-toolbar {
    min-height: 70px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 18px 22px;

    border-bottom: 1px solid #e7e9ec;
}

.workspace-toolbar strong {
    display: block;
    margin-bottom: 5px;
}

.workspace-toolbar span {
    color: #858a91;
    font-size: 13px;
}


/* Tabs */

.mode-tabs {
    display: flex;
    gap: 4px;

    padding: 10px;

    background: #f4f5f7;

    border-bottom: 1px solid #e3e5e8;
}

.mode-tab {
    padding: 10px 18px;

    border: 0;
    border-radius: 9px;

    background: transparent;

    cursor: pointer;

    color: #656a70;

    font-family: inherit;
    font-weight: 700;
}

.mode-tab.active {
    background: #fff;
    color: #202124;

    box-shadow:
        0 1px 4px
        rgba(0, 0, 0, 0.08);
}


/* Main */

.workspace-body {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        350px;

    min-height: 610px;
}

.preview-panel {
    min-width: 0;

    padding: 24px;

    background: #f5f6f8;

    overflow-y: auto;
}

.settings-panel {
    padding: 25px;

    border-left: 1px solid #e2e5e9;

    background: #fff;
}

.settings-panel h2 {
    margin: 0 0 8px;
    font-size: 20px;
}

.setting-note {
    margin: 0 0 22px;

    color: #747980;

    font-size: 13px;
    line-height: 1.7;
}

.field-label {
    display: block;

    margin-bottom: 8px;

    color: #4a4e53;

    font-size: 13px;
    font-weight: 700;
}

.number-input,
.text-input {
    width: 100%;

    padding: 11px 12px;

    border: 1px solid #d6dae0;
    border-radius: 9px;

    outline: none;

    font: inherit;
}

.number-input:focus,
.text-input:focus {
    border-color: #777d85;
}

.expression-help {
    margin-top: 7px;

    color: #959aa0;

    font-size: 11px;
}


/* Custom ranges */

.range-row {
    display: grid;

    grid-template-columns:
        1fr
        20px
        1fr
        34px;

    align-items: center;

    gap: 7px;

    margin-bottom: 10px;
}

.range-row input {
    width: 100%;

    padding: 10px 8px;

    border: 1px solid #d6dae0;
    border-radius: 8px;

    text-align: center;

    font: inherit;
}

.range-row .range-to {
    text-align: center;

    color: #858a91;
}

.remove-range-btn {
    width: 34px;
    height: 34px;

    border: 0;
    border-radius: 8px;

    cursor: pointer;

    background: #f5f6f7;
    color: #a82a22;

    font-size: 18px;
}

.add-range-btn {
    width: 100%;

    margin-top: 5px;
    padding: 11px;

    border: 1px dashed #c9cdd3;
    border-radius: 9px;

    background: #fafafa;
    color: #44494f;
}


/* Preview cards */

.empty-preview {
    min-height: 430px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #979ca3;

    text-align: center;
    line-height: 1.8;
}

.range-group {
    margin-bottom: 22px;
}

.range-group-title {
    margin-bottom: 10px;

    font-size: 13px;
    font-weight: 800;

    color: #45494e;
}

.thumbnail-grid {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fill,
            minmax(120px, 1fr)
        );

    gap: 12px;
}

.page-card {
    position: relative;

    padding: 8px;

    background: #fff;

    border: 2px solid transparent;
    border-radius: 10px;

    cursor: default;
}

.page-card.selectable {
    cursor: pointer;
}

.page-card.selected {
    border-color: #202124;
}

.page-card canvas {
    display: block;

    width: 100%;
    height: auto;

    background: #fff;

    border: 1px solid #eceef1;
    border-radius: 5px;
}

.page-number {
    margin-top: 7px;

    color: #6f747a;

    font-size: 11px;

    text-align: center;
}

.check-mark {
    position: absolute;

    top: 13px;
    right: 13px;

    width: 25px;
    height: 25px;

    display: none;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #202124;
    color: #fff;

    font-size: 14px;
    font-weight: 800;
}

.page-card.selected .check-mark {
    display: flex;
}


/* Selection */

.check-row {
    display: flex;
    align-items: flex-start;

    gap: 10px;

    margin-top: 22px;

    cursor: pointer;

    color: #4d5156;

    font-size: 13px;
    line-height: 1.55;
}

.check-row input {
    margin-top: 3px;
}

.setting-summary {
    margin-top: 18px;

    padding: 11px 12px;

    border-radius: 9px;

    background: #f4f5f6;

    color: #6b7076;

    font-size: 12px;
    line-height: 1.6;
}


/* Error and action */

.error-box {
    margin-top: 18px;

    padding: 11px 12px;

    border: 1px solid #f0c2be;
    border-radius: 9px;

    background: #fff0ef;
    color: #a9251d;

    font-size: 12px;
    line-height: 1.6;
}

.split-btn {
    width: 100%;

    margin-top: 24px;
    padding: 13px 20px;

    border: 0;
    border-radius: 11px;

    background: #202124;
    color: #fff;

    font-size: 15px;
}

.split-btn:disabled {
    cursor: not-allowed;
    background: #c5c8cc;
}

.message-box {
    margin-top: 18px;

    padding: 14px 17px;

    border-radius: 11px;

    font-size: 14px;
}

.message-box.error {
    border: 1px solid #f0c2be;

    background: #fff0ef;
    color: #a9251d;
}

.message-box.success {
    border: 1px solid #c9e6cf;

    background: #eef8f0;
    color: #246b31;
}

.hidden {
    display: none !important;
}


@media (max-width: 850px) {
    .workspace-body {
        grid-template-columns: 1fr;
    }

    .settings-panel {
        border-top: 1px solid #e2e5e9;
        border-left: 0;
    }
}


@media (max-width: 600px) {
    .split-title h1 {
        font-size: 34px;
    }

    .mode-tabs {
        overflow-x: auto;
    }

    .mode-tab {
        white-space: nowrap;
    }

    .preview-panel {
        padding: 14px;
    }

    .thumbnail-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }
}
