.content {
    display: flex;
    gap: 20px;
}

.left {
    width: 30%;
}

.right {
    width: 70%;
}

.section {
    background: #fafafa;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #eee;
}

label {
    font-size: 13px;
    font-weight: bold;
}

input,
select {
    width: 100%;
    padding: 10px;
    margin-top: 8px;
    border-radius: 6px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

button {
    width: 100%;
    margin-top: 10px;
    padding: 12px;
    background: linear-gradient(135deg, #0a3d62, #07517d);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

button:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.rotation-status {
    margin-top: 10px;
    font-size: 13px;
    color: #555;
    text-align: center;
}

.page {
    border: 2px solid #ddd;
    border-radius: 6px;
    padding: 5px;
    background: #fff;
    text-align: center;
}

.page canvas {
    width: 100%;
    display: block;
}

.preview-wrap {
    position: relative;
}

#preview {
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-height: 75vh;
    min-height: 30vh;
    overflow: auto;
    padding: 10px;
}

.processing-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, .88);
    border-radius: 8px;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: bold;
    color: #0a3d62;
    z-index: 5;
}

.spinner {
    width: 34px;
    height: 34px;
    border: 4px solid #d8e3ea;
    border-top-color: #0a3d62;
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media(max-width:768px) {
    .content {
        flex-direction: column;
    }

    .left,
    .right {
        width: 100%;
    }

    #preview {
        grid-template-columns: repeat(2, 1fr);
    }
}