/* ==========================================
   ZIJAI ADMIN - COMPLETE CSS
========================================== */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    font-family:
        Arial,
        Helvetica,
        sans-serif;

    background: #f4f6f4;
    color: #222;
}


/* ==========================================
   MAIN LAYOUT
========================================== */

.admin-layout {
    display: flex;
    min-height: 100vh;
}


/* ==========================================
   SIDEBAR
========================================== */

.admin-sidebar {
    width: 250px;
    min-width: 250px;

    background: #1d1d1d;
    color: #fff;

    display: flex;
    flex-direction: column;

    min-height: 100vh;

    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;

    z-index: 1000;
}


/* ==========================================
   LOGO
========================================== */

.admin-logo {
    padding: 28px 25px;

    font-size: 28px;
    font-weight: 800;

    letter-spacing: 4px;

    color: #ffbd00;

    border-bottom: 1px solid
        rgba(255,255,255,0.08);
}

.admin-logo span {
    display: block;

    margin-top: 3px;

    font-size: 10px;
    letter-spacing: 3px;

    color: #aaa;
}


/* ==========================================
   NAVIGATION
========================================== */

.admin-sidebar nav {
    padding: 20px 12px;
}

.admin-nav {
    display: flex;
    align-items: center;

    gap: 13px;

    width: 100%;

    padding: 13px 15px;

    margin-bottom: 6px;

    border: 0;

    border-radius: 10px;

    background: transparent;

    color: #ccc;

    text-decoration: none;

    font-size: 15px;

    transition:
        background 0.2s,
        color 0.2s;
}

.admin-nav i {
    width: 20px;

    font-size: 18px;

    text-align: center;
}

.admin-nav:hover {
    background: #2c2c2c;

    color: #fff;
}

.admin-nav.active {
    background: #ffbd00;

    color: #111;

    font-weight: 700;
}


/* ==========================================
   NAV COUNT
========================================== */

.nav-count {
    margin-left: auto;

    min-width: 24px;
    height: 24px;

    padding: 2px 7px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 20px;

    background: #e53935;

    color: #fff;

    font-size: 12px;
    font-weight: 700;
}


/* ==========================================
   LOGOUT
========================================== */

.logout-btn {
    cursor: pointer;

    text-align: left;

    font-family: inherit;
}

.logout-btn:hover {
    background: #8f1d1d;

    color: #fff;
}


/* ==========================================
   SIDEBAR BOTTOM
========================================== */

.admin-sidebar-bottom {
    margin-top: auto;

    padding: 20px 15px;

    border-top: 1px solid
        rgba(255,255,255,0.08);
}

.admin-status {
    display: flex;

    align-items: center;

    gap: 8px;

    color: #aaa;

    font-size: 12px;
}

.admin-status span {
    width: 9px;
    height: 9px;

    border-radius: 50%;

    background: #22c55e;

    box-shadow:
        0 0 8px
        rgba(34,197,94,0.7);
}


/* ==========================================
   MAIN
========================================== */

.admin-main {
    width: calc(100% - 250px);

    margin-left: 250px;

    padding: 35px;

    min-height: 100vh;
}


/* ==========================================
   TOP HEADER
========================================== */

.admin-topbar {
    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 20px;

    margin-bottom: 30px;
}

.admin-topbar h1 {
    margin: 0;

    font-size: 36px;

    font-weight: 800;
}

.admin-topbar p {
    margin: 6px 0 0;

    color: #777;

    font-size: 15px;
}

.admin-date {
    display: flex;

    align-items: center;

    gap: 8px;

    padding: 10px 16px;

    background: #fff;

    border: 1px solid #e6e6e6;

    border-radius: 10px;

    color: #555;

    white-space: nowrap;
}


/* ==========================================
   STATISTICS
========================================== */

.stats-grid {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 20px;

    margin-bottom: 30px;
}

.stat-card {
    display: flex;

    align-items: center;

    gap: 16px;

    padding: 22px;

    background: #fff;

    border-radius: 15px;

    border: 1px solid #e8e8e8;

    box-shadow:
        0 5px 20px
        rgba(0,0,0,0.04);
}

.stat-icon {
    width: 52px;
    height: 52px;

    min-width: 52px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 14px;

    font-size: 22px;
}

.orders-icon {
    background: #fff3cd;
    color: #856404;
}

.sales-icon {
    background: #d1e7dd;
    color: #198754;
}

.pending-icon {
    background: #ffe5d0;
    color: #dc5a00;
}

.delivery-icon {
    background: #cff4fc;
    color: #087990;
}

.stat-card span {
    display: block;

    margin-bottom: 5px;

    color: #777;

    font-size: 13px;
}

.stat-card strong {
    display: block;

    font-size: 26px;

    font-weight: 800;
}


/* ==========================================
   ADMIN CARD
========================================== */

.admin-card {
    background: #fff;

    border: 1px solid #e8e8e8;

    border-radius: 18px;

    padding: 28px;

    box-shadow:
        0 5px 25px
        rgba(0,0,0,0.04);
}


/* ==========================================
   SECTION HEADING
========================================== */

.section-heading {
    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 20px;

    margin-bottom: 25px;
}

.section-heading h3 {
    margin: 0;

    font-size: 25px;

    font-weight: 800;
}

.section-heading p {
    margin: 5px 0 0;

    color: #777;
}


/* ==========================================
   LIVE BADGE
========================================== */

.live-badge {
    display: inline-flex;

    align-items: center;

    gap: 8px;

    padding: 9px 16px;

    background: #e3f7e9;

    color: #16733b;

    border-radius: 30px;

    font-size: 12px;

    font-weight: 800;

    letter-spacing: 1px;
}

.live-badge span {
    width: 8px;
    height: 8px;

    border-radius: 50%;

    background: #19a34a;

    box-shadow:
        0 0 7px
        rgba(25,163,74,0.6);
}


/* ==========================================
   LOADING
========================================== */

.loading-box {
    padding: 50px 20px;

    text-align: center;

    color: #777;
}

.loading-box .spinner-border {
    width: 35px;
    height: 35px;
}


/* ==========================================
   ORDER CARD
========================================== */

.order-admin-card {
    background: #fff;

    border: 1px solid #e4e7e4;

    border-radius: 15px;

    padding: 22px;

    margin-bottom: 18px;

    box-shadow:
        0 4px 18px
        rgba(0,0,0,0.04);
}

.order-header {
    display: flex;

    align-items: flex-start;

    justify-content: space-between;

    gap: 20px;

    margin-bottom: 20px;
}

.order-header h4 {
    margin: 0 0 5px;

    font-size: 22px;

    font-weight: 800;
}

.order-header small {
    color: #777;
}


/* ==========================================
   STATUS SELECT
========================================== */

.order-status-select {
    min-width: 180px;

    padding: 9px 12px;

    border: 1px solid #ccc;

    border-radius: 8px;

    background: #fff;

    font-size: 14px;

    cursor: pointer;
}


/* ==========================================
   CUSTOMER
========================================== */

.customer-details {
    padding: 15px;

    margin-bottom: 15px;

    background: #f8faf8;

    border-radius: 10px;
}

.customer-details h5 {
    margin: 0 0 10px;

    font-size: 17px;

    font-weight: 700;
}

.customer-details div {
    margin-bottom: 7px;

    color: #555;

    font-size: 14px;
}

.customer-details i {
    width: 20px;

    color: #198754;
}


/* ==========================================
   ORDER ITEMS
========================================== */

.order-items {
    padding: 15px;

    background: #f7f8f7;

    border-radius: 10px;

    margin-bottom: 15px;
}

.order-item {
    display: flex;

    justify-content: space-between;

    gap: 20px;

    padding: 8px 0;

    border-bottom: 1px solid #e4e4e4;

    font-size: 14px;
}

.order-item:last-child {
    border-bottom: 0;
}


/* ==========================================
   ORDER FOOTER
========================================== */

.order-footer {
    display: flex;

    justify-content: flex-end;

    align-items: center;

    gap: 30px;

    padding-top: 18px;

    border-top: 1px solid #eee;
}

.order-footer span {
    display: block;

    color: #777;

    font-size: 12px;

    margin-bottom: 3px;
}

.order-footer strong {
    font-size: 15px;
}

.order-total strong {
    color: #176b28;

    font-size: 21px;
}


/* ==========================================
   ETA CONTROL
========================================== */

.eta-control {
    background: #f7f9f7;

    border: 1px solid #e3e8e3;

    border-radius: 12px;

    padding: 18px;
}

.eta-control select {
    background: #fff;
}

.update-eta-btn:hover {
    background: #146c43 !important;
}


/* ==========================================
   NEW LIVE ORDER STATISTICS
========================================== */

.order-stats {
    display: grid;

    grid-template-columns:
        repeat(5, 1fr);

    gap: 15px;

    margin-bottom: 25px;
}

.order-stat-card {
    background: #fff;

    border: 1px solid #e5e5e5;

    border-radius: 14px;

    padding: 18px;

    display: flex;

    align-items: center;

    gap: 13px;

    box-shadow:
        0 4px 15px
        rgba(0,0,0,0.04);
}

.order-stat-card span {
    display: block;

    font-size: 12px;

    color: #777;

    margin-bottom: 3px;
}

.order-stat-card strong {
    display: block;

    font-size: 25px;
}

.order-stat-icon {
    width: 45px;
    height: 45px;

    min-width: 45px;

    border-radius: 50%;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 19px;
}

.order-stat-icon.new {
    background: #fff3cd;

    color: #856404;
}

.order-stat-icon.preparing {
    background: #ffe5d0;

    color: #dc5a00;
}

.order-stat-icon.ready {
    background: #d1e7dd;

    color: #198754;
}

.order-stat-icon.delivery {
    background: #cff4fc;

    color: #087990;
}

.order-stat-icon.delivered {
    background: #e2e3e5;

    color: #41464b;
}


/* ==========================================
   ALERT
========================================== */

.alert {
    border-radius: 10px;
}


/* ==========================================
   RESPONSIVE
========================================== */

@media (max-width: 1200px) {

    .stats-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .order-stats {
        grid-template-columns:
            repeat(3, 1fr);
    }

}


@media (max-width: 900px) {

    .admin-sidebar {
        width: 210px;

        min-width: 210px;
    }

    .admin-main {
        width: calc(100% - 210px);

        margin-left: 210px;

        padding: 25px;
    }

    .order-stats {
        grid-template-columns:
            repeat(2, 1fr);
    }

}


@media (max-width: 700px) {

    .admin-sidebar {
        position: relative;

        width: 100%;

        min-width: 100%;

        min-height: auto;
    }

    .admin-layout {
        display: block;
    }

    .admin-main {
        width: 100%;

        margin-left: 0;

        padding: 20px;
    }

    .admin-topbar {
        flex-direction: column;

        align-items: flex-start;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .order-stats {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .order-header {
        flex-direction: column;
    }

    .order-status-select {
        width: 100%;
    }

    .order-footer {
        flex-wrap: wrap;

        justify-content: flex-start;
    }

}


@media (max-width: 450px) {

    .order-stats {
        grid-template-columns: 1fr;
    }

    .admin-main {
        padding: 15px;
    }

    .admin-card {
        padding: 18px;
    }

}