/* =========================================================
   JAGANNATH XEROX CENTRE
   DELIVERY BOY DASHBOARD - COMPLETE CSS
========================================================= */


/* =========================================================
   GLOBAL
========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    background: #f4f7fb;
    color: #222;

    min-height: 100vh;
}


/* =========================================================
   HEADER
========================================================= */

header {
    background:
        linear-gradient(
            135deg,
            #1473e6,
            #08aeea
        );

    color: white;

    text-align: center;

    padding: 28px 15px;

    box-shadow:
        0 3px 12px rgba(0, 0, 0, 0.15);
}

header h1 {
    margin: 0;

    font-size: 32px;

    font-weight: 700;
}

header p {
    margin: 8px 0 0;

    font-size: 17px;

    opacity: 0.95;
}


/* =========================================================
   NAVIGATION
========================================================= */

nav {
    background: white;

    display: flex;

    justify-content: center;

    align-items: center;

    gap: 10px;

    padding: 12px;

    flex-wrap: wrap;

    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.10);

    position: sticky;

    top: 0;

    z-index: 100;
}

nav a,
nav button {
    text-decoration: none;

    border: 1px solid #ddd;

    background: #f5f5f5;

    color: #222;

    padding: 10px 16px;

    border-radius: 8px;

    font-weight: bold;

    cursor: pointer;

    font-size: 14px;

    transition:
        0.2s ease;
}

nav a:hover {
    background: #1473e6;

    color: white;

    border-color: #1473e6;

    transform: translateY(-1px);
}

nav button {
    background: #dc3545;

    color: white;

    border-color: #dc3545;
}

nav button:hover {
    background: #bb2d3b;

    border-color: #bb2d3b;

    transform: translateY(-1px);
}


/* =========================================================
   MAIN
========================================================= */

main {
    width: 100%;

    max-width: 1100px;

    margin: 30px auto;

    padding: 15px;
}


/* =========================================================
   WELCOME BOX
========================================================= */

.welcome-box {
    background: white;

    padding: 25px;

    border-radius: 14px;

    margin-bottom: 25px;

    box-shadow:
        0 3px 15px rgba(0, 0, 0, 0.08);

    text-align: center;
}

.welcome-box h2 {
    margin-top: 0;

    margin-bottom: 12px;

    color: #1473e6;

    font-size: 26px;
}

.welcome-box p {
    margin: 8px 0;

    color: #555;

    line-height: 1.5;
}

#deliveryBoyName {
    color: #198754;
}

#deliveryBoyEmail {
    font-weight: bold;

    color: #444;
}


/* =========================================================
   ORDER SUMMARY
========================================================= */

.summary-grid {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 15px;

    margin-bottom: 25px;
}


/* =========================================================
   SUMMARY CARD
========================================================= */

.summary-card {
    background: white;

    border-radius: 14px;

    padding: 20px;

    display: flex;

    align-items: center;

    gap: 15px;

    box-shadow:
        0 3px 12px rgba(0, 0, 0, 0.08);

    border: 1px solid #e8e8e8;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.summary-card:hover {
    transform: translateY(-3px);

    box-shadow:
        0 7px 20px rgba(0, 0, 0, 0.12);
}


/* =========================================================
   SUMMARY ICON
========================================================= */

.summary-icon {
    width: 55px;

    height: 55px;

    min-width: 55px;

    display: flex;

    align-items: center;

    justify-content: center;

    background: #f1f5f9;

    border-radius: 12px;

    font-size: 28px;
}


/* =========================================================
   SUMMARY TEXT
========================================================= */

.summary-card h3 {
    margin: 0;

    font-size: 28px;

    color: #1473e6;

    line-height: 1;
}

.summary-card p {
    margin: 7px 0 0;

    color: #666;

    font-size: 14px;

    font-weight: bold;
}


/* =========================================================
   LOCATION BOX
========================================================= */

.location-box {
    background: #e8f4ff;

    border: 1px solid #b8ddff;

    padding: 20px;

    border-radius: 12px;

    margin-bottom: 25px;

    text-align: center;
}

.location-box h3 {
    margin-top: 0;

    margin-bottom: 10px;

    color: #1473e6;
}

.location-box p {
    margin: 8px 0;

    color: #555;

    line-height: 1.5;
}


/* =========================================================
   LOCATION BUTTON
========================================================= */

.location-btn {
    border: none;

    background: #0d6efd;

    color: white;

    padding: 12px 20px;

    border-radius: 8px;

    cursor: pointer;

    font-size: 15px;

    font-weight: bold;

    transition:
        0.2s ease;
}

.location-btn:hover {
    background: #0b5ed7;

    transform: translateY(-1px);
}

.location-btn:disabled {
    background: #adb5bd;

    cursor: not-allowed;

    transform: none;
}


/* =========================================================
   LOCATION MESSAGE
========================================================= */

#locationMessage {
    margin-top: 12px;

    font-size: 14px;

    line-height: 1.6;

    color: #333;
}


/* =========================================================
   ORDERS CONTAINER
========================================================= */

#ordersContainer {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(320px, 1fr)
        );

    gap: 20px;
}


/* =========================================================
   ORDER CARD
========================================================= */

.order-card {
    background: white;

    border-radius: 15px;

    padding: 20px;

    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.10);

    border-top: 5px solid #1473e6;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.order-card:hover {
    transform: translateY(-3px);

    box-shadow:
        0 8px 22px rgba(0, 0, 0, 0.13);
}


/* =========================================================
   ORDER HEADER
========================================================= */

.order-header {
    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 10px;

    margin-bottom: 15px;

    flex-wrap: wrap;
}

.order-header h3 {
    margin: 0;

    color: #1473e6;

    font-size: 19px;
}


/* =========================================================
   STATUS
========================================================= */

.status {
    display: inline-block;

    padding: 6px 10px;

    border-radius: 20px;

    font-size: 13px;

    font-weight: bold;

    white-space: nowrap;
}


/* Assigned */

.assigned {
    background: #fff3cd;

    color: #664d03;
}


/* Out for Delivery */

.out {
    background: #cfe2ff;

    color: #084298;
}


/* Delivered */

.delivered {
    background: #d1e7dd;

    color: #0f5132;
}


/* =========================================================
   CUSTOMER INFO BOX
========================================================= */

.info-box {
    background: #f8f9fa;

    padding: 12px;

    border-radius: 9px;

    margin-bottom: 12px;

    border: 1px solid #eeeeee;
}

.info-box strong {
    display: block;

    margin-bottom: 8px;

    color: #333;
}

.info-box p {
    margin: 7px 0;

    line-height: 1.5;

    word-break: break-word;
}


/* =========================================================
   ITEM
========================================================= */

.item {
    background: white;

    border: 1px solid #ddd;

    padding: 10px;

    border-radius: 7px;

    margin-top: 8px;

    line-height: 1.6;

    word-break: break-word;
}

.item:first-child {
    margin-top: 0;
}


/* =========================================================
   GENERAL BUTTON
========================================================= */

.btn {
    display: block;

    width: 100%;

    border: none;

    padding: 12px;

    border-radius: 8px;

    margin-top: 10px;

    font-size: 15px;

    font-weight: bold;

    cursor: pointer;

    text-align: center;

    text-decoration: none;

    transition:
        0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}


/* =========================================================
   CALL BUTTON
========================================================= */

.call-btn {
    background: #198754;

    color: white;
}

.call-btn:hover {
    background: #157347;
}


/* =========================================================
   MAP BUTTON
========================================================= */

.map-btn {
    background: #0d6efd;

    color: white;
}

.map-btn:hover {
    background: #0b5ed7;
}


/* =========================================================
   OUT FOR DELIVERY BUTTON
========================================================= */

.out-btn {
    background: #fd7e14;

    color: white;
}

.out-btn:hover {
    background: #e8590c;
}


/* =========================================================
   DELIVERED BUTTON
========================================================= */

.delivered-btn {
    background: #198754;

    color: white;
}

.delivered-btn:hover {
    background: #157347;
}


/* =========================================================
   DISABLED BUTTON
========================================================= */

.disabled-btn {
    background: #adb5bd;

    color: white;

    cursor: not-allowed;
}

.disabled-btn:hover {
    transform: none;
}


/* =========================================================
   LOADING / EMPTY MESSAGE
========================================================= */

.message-box {
    background: white;

    padding: 35px;

    border-radius: 12px;

    text-align: center;

    box-shadow:
        0 3px 12px rgba(0, 0, 0, 0.08);

    margin-bottom: 20px;

    color: #555;
}

.message-box h2 {
    margin-top: 0;

    color: #1473e6;
}


/* =========================================================
   FOOTER
========================================================= */

footer {
    margin-top: 40px;

    background: #212529;

    color: white;

    text-align: center;

    padding: 25px;

    font-size: 14px;
}


/* =========================================================
   LINKS
========================================================= */

a {
    transition: 0.2s ease;
}


/* =========================================================
   MOBILE - TABLET
========================================================= */

@media (max-width: 900px) {

    .summary-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

    header {
        padding: 22px 12px;
    }

    header h1 {
        font-size: 25px;
    }

    header p {
        font-size: 15px;
    }


    nav {
        position: static;

        gap: 7px;

        padding: 10px;
    }


    nav a,
    nav button {
        padding: 9px 12px;

        font-size: 13px;
    }


    main {
        padding: 10px;

        margin: 20px auto;
    }


    .welcome-box {
        padding: 20px 15px;
    }


    .welcome-box h2 {
        font-size: 22px;
    }


    .summary-grid {
        grid-template-columns: 1fr;

        gap: 12px;
    }


    .summary-card {
        padding: 16px;
    }


    .summary-card h3 {
        font-size: 25px;
    }


    #ordersContainer {
        grid-template-columns: 1fr;

        gap: 15px;
    }


    .order-card {
        padding: 16px;
    }


    .order-header {
        flex-direction: column;

        align-items: flex-start;
    }


    .location-box {
        padding: 18px 12px;
    }

}


/* =========================================================
   VERY SMALL MOBILE
========================================================= */

@media (max-width: 380px) {

    header h1 {
        font-size: 22px;
    }


    nav a,
    nav button {
        width: 100%;

        text-align: center;
    }


    .summary-card {
        padding: 14px;
    }


    .summary-icon {
        width: 48px;

        height: 48px;

        min-width: 48px;

        font-size: 24px;
    }


    .summary-card h3 {
        font-size: 23px;
    }


    .btn {
        font-size: 14px;

        padding: 11px;
    }

}