/* =========================================================
   GLOBAL
========================================================= */

* {
    box-sizing: border-box;
}

body {
    background: #f5f7fb;
    color: #212529;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}


/* =========================================================
   NAVBAR
========================================================= */

.app-navbar {
    background: linear-gradient(
        135deg,
        #0d6efd,
        #084298
    );

    box-shadow:
        0 3px 15px rgba(0, 0, 0, 0.12);
}


/* =========================================================
   TITLE
========================================================= */

.main-title {
    font-size: 42px;
    font-weight: 700;
    color: #172033;
    margin-bottom: 12px;
}

.main-description {
    color: #687386;
    font-size: 17px;
}


/* =========================================================
   UPLOAD
========================================================= */

.upload-box {
    max-width: 850px;
    margin: 0 auto;
    background: #ffffff;

    border: 2px dashed #b7c7e6;

    border-radius: 18px;

    padding: 60px 30px;

    text-align: center;

    cursor: pointer;

    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        transform 0.2s ease;

    box-shadow:
        0 10px 35px rgba(22, 34, 51, 0.06);
}

.upload-box:hover {
    border-color: #0d6efd;
    background: #f8fbff;
}

.upload-box.drag-over {
    border-color: #198754;
    background: #f0fff7;
    transform: scale(1.01);
}

.upload-icon {
    width: 80px;
    height: 80px;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0 auto 20px;

    background: #eaf2ff;

    color: #0d6efd;

    font-size: 40px;
}

.upload-box h3 {
    font-weight: 700;
    margin-bottom: 10px;
}


/* =========================================================
   SECTION HEADER
========================================================= */

.section-header {
    background: #ffffff;

    padding: 20px 22px;

    border-radius: 14px 14px 0 0;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    border-bottom: 1px solid #e9ecef;
}

.section-header h4 {
    font-weight: 700;
}


/* =========================================================
   IMAGE GRID
========================================================= */

.image-grid {
    background: #ffffff;

    padding: 25px;

    display: grid;

    grid-template-columns:
        repeat(auto-fill, minmax(210px, 1fr));

    gap: 20px;

    border-radius: 0 0 14px 14px;
}


/* =========================================================
   IMAGE CARD
========================================================= */

.image-card {
    position: relative;

    background: #ffffff;

    border: 1px solid #e1e6ef;

    border-radius: 12px;

    overflow: hidden;

    box-shadow:
        0 5px 18px rgba(0, 0, 0, 0.06);

    cursor: grab;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.image-card:hover {
    transform: translateY(-3px);

    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.1);
}

.image-card:active {
    cursor: grabbing;
}

.image-preview {
    height: 220px;

    background: #f1f3f5;

    display: flex;

    align-items: center;
    justify-content: center;

    overflow: hidden;
}

.image-preview img {
    width: 100%;
    height: 100%;

    object-fit: contain;
}

.image-info {
    padding: 12px 14px;
}

.image-name {
    font-size: 14px;

    font-weight: 600;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}

.image-number {
    font-size: 12px;

    color: #6c757d;
}


/* =========================================================
   REMOVE BUTTON
========================================================= */

.remove-image {
    position: absolute;

    top: 8px;
    right: 8px;

    width: 34px;
    height: 34px;

    border: 0;

    border-radius: 50%;

    background: rgba(220, 53, 69, 0.95);

    color: #ffffff;

    display: flex;

    align-items: center;
    justify-content: center;

    cursor: pointer;

    z-index: 5;
}

.remove-image:hover {
    background: #bb2d3b;
}


/* =========================================================
   DRAG HELP
========================================================= */

.drag-help {
    text-align: center;

    color: #7b8494;

    font-size: 13px;

    margin-top: 10px;
}


/* =========================================================
   SETTINGS
========================================================= */

.settings-card {
    background: #ffffff;

    border-radius: 15px;

    padding: 30px;

    box-shadow:
        0 8px 30px rgba(20, 35, 55, 0.07);
}

.settings-title {
    font-size: 20px;

    font-weight: 700;

    margin-bottom: 25px;

    color: #172033;
}

.form-label {
    font-weight: 600;

    color: #374151;
}

.form-select,
.form-control {
    min-height: 46px;

    border-color: #d8dee8;
}

.form-select:focus,
.form-control:focus {
    border-color: #86b7fe;

    box-shadow:
        0 0 0 0.2rem rgba(13, 110, 253, 0.12);
}


/* =========================================================
   CONVERT
========================================================= */

.convert-area {
    border-top: 1px solid #edf0f4;

    padding-top: 25px;

    text-align: center;
}

#createPdfBtn {
    min-width: 230px;

    font-weight: 600;

    box-shadow:
        0 7px 18px rgba(25, 135, 84, 0.2);
}


/* =========================================================
   PROGRESS
========================================================= */

.progress-card {
    background: #ffffff;

    border-radius: 15px;

    padding: 30px;

    box-shadow:
        0 8px 30px rgba(20, 35, 55, 0.07);
}

.progress {
    height: 12px;

    border-radius: 20px;

    overflow: hidden;
}


/* =========================================================
   FEATURES
========================================================= */

.feature-card {
    background: #ffffff;

    padding: 30px;

    height: 100%;

    border-radius: 15px;

    text-align: center;

    box-shadow:
        0 7px 25px rgba(20, 35, 55, 0.06);
}

.feature-icon {
    width: 65px;
    height: 65px;

    margin: 0 auto 18px;

    border-radius: 50%;

    display: flex;

    align-items: center;
    justify-content: center;

    background: #eaf2ff;

    color: #0d6efd;

    font-size: 28px;
}

.feature-card h5 {
    font-weight: 700;
}

.feature-card p {
    color: #6c757d;

    margin-bottom: 0;

    line-height: 1.6;
}


/* =========================================================
   FOOTER
========================================================= */

.app-footer {
    margin-top: 60px;

    background: #172033;

    color: #adb5bd;

    padding: 22px 0;

    font-size: 14px;
}


/* =========================================================
   SORTABLE
========================================================= */

.sortable-ghost {
    opacity: 0.4;
}

.sortable-chosen {
    box-shadow:
        0 15px 35px rgba(13, 110, 253, 0.18);
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 768px) {

    .main-title {
        font-size: 32px;
    }

    .upload-box {
        padding: 40px 20px;
    }

    .section-header {
        flex-direction: column;

        align-items: stretch;
    }

    .section-header > div:last-child {
        display: flex;
    }

    .section-header button {
        flex: 1;
    }

    .image-grid {
        grid-template-columns:
            repeat(2, 1fr);

        padding: 15px;

        gap: 12px;
    }

    .image-preview {
        height: 160px;
    }

    .settings-card {
        padding: 20px;
    }

}

@media (max-width: 480px) {

    .image-grid {
        grid-template-columns: 1fr;
    }

    .image-preview {
        height: 230px;
    }

}