body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #f8f8f8;
}

h1 {
    color: orange;
}

/* Header */

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    background-color: white;
}

.logo {
    font-size: 26px;
    font-weight: bold;
    color: orange;
}

.nav-menu {
    display: flex;
    gap: 25px;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-size: 16px;
}

.nav-menu a:hover {
    color: orange;
}


/* Hero */

.hero {
    text-align: center;
    padding: 60px 20px;
}

.hero h1 {
    color: #333;
    font-size: 32px;
}

.hero p {
    color: #666;
    font-size: 18px;
}


/* Search */

.search-section {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    flex-wrap: wrap;
}

.search-section input {
    width: 400px;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
}

.search-section button {
    padding: 14px 22px;
    border: none;
    border-radius: 8px;
    background-color: orange;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

.search-section #food-search-message {
    flex-basis: 100%;
    margin: 0;
    text-align: center;
}

/* Categories */

.categories {
    text-align: center;
    padding: 35px 20px;
    background-color: #fffaf2;
}

.categories h2 {
    font-size: 28px;
    margin-bottom: 25px;
}

.category-list {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.category-list button {
    padding: 15px 22px;
    border: none;
    border-radius: 12px;
    background-color: white;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
}

.category-list button:hover {
    transform: translateY(-3px);
    background-color: orange;
    color: white;
}


/* Food Sections */

.popular-foods {
    padding: 30px 40px;
    text-align: center;
}

.popular-foods h2 {
    font-size: 28px;
    margin-bottom: 25px;
}

.food-list {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
    max-width: 850px;
    margin: 0 auto;
}

/* Modern Premium Food Card */

.food-card {
    width: 200px;
    padding: 12px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    overflow: hidden;
}

.food-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.13);
}

/* Food Image */

.food-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 13px;
    display: block;
}

/* Food Name */

.food-card h3 {
    margin: 14px 0 5px;
    font-size: 18px;
    font-weight: 750;
    color: #202b25;
    text-align: left;
}

/* Restaurant Name */

.food-card .restaurant-name {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 400;
    color: #929a95;
    text-align: left;
}

/* Food Price */

.food-card .food-price {
    margin: 8px 0 13px;
    font-size: 20px;
    font-weight: 800;
    color: #168447;
    text-align: left;
}

/* Order Button */

.food-card button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 11px;
    background: #168447;
    color: white;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.food-card button:hover {
    background: #116b38;
    transform: translateY(-2px);
}

/* Burger Section */

.burger-section {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    padding: 30px 40px;
    text-align: center;
}

.burger-section.show {
    display: block;
    animation: burgerAppear 0.5s ease forwards;
}

.burger-section h2 {
    font-size: 30px;
    margin-bottom: 30px;
    color: #333;
}

.chicken-section {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    padding: 30px 40px;
    text-align: center;
}

.chicken-section.show {
    display: block;
    animation: burgerAppear 0.5s ease forwards;
}

.chicken-section h2 {
    font-size: 30px;
    margin-bottom: 30px;
    color: #333;
}

.snacks-section {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    padding: 30px 40px;
    text-align: center;
}

.snacks-section.show {
    display: block;
    animation: burgerAppear 0.5s ease forwards;
}

.snacks-section h2 {
    font-size: 30px;
    margin-bottom: 30px;
    color: #333;
}

.drinks-section {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    padding: 30px 40px;
    text-align: center;
}

.drinks-section.show {
    display: block;
    animation: burgerAppear 0.5s ease forwards;
}

.drinks-section h2 {
    font-size: 30px;
    margin-bottom: 30px;
    color: #333;
}

/* Fish Section */

.fish-section {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    padding: 30px 40px;
    text-align: center;
}

.fish-section.show {
    display: block;
    animation: burgerAppear 0.5s ease forwards;
}

.fish-section h2 {
    font-size: 30px;
    margin-bottom: 30px;
    color: #333;
}

/* Rice Section */

.rice-section {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    padding: 30px 40px;
    text-align: center;
}

.rice-section.show {
    display: block;
    animation: burgerAppear 0.5s ease forwards;
}

.rice-section h2 {
    font-size: 30px;
    margin-bottom: 30px;
    color: #333;
}

/* Bhorta Section */
.bhorta-section {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    padding: 30px 40px;
    text-align: center;
}

.bhorta-section.show {
    display: block;
    animation: burgerAppear 0.5s ease forwards;
}

.bhorta-section h2 {
    font-size: 30px;
    margin-bottom: 30px;
    color: #333;
}

/* Vegetables Section */
.vegetables-section {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    padding: 30px 40px;
    text-align: center;
}

.vegetables-section.show {
    display: block;
    animation: burgerAppear 0.5s ease forwards;
}

.vegetables-section h2 {
    font-size: 30px;
    margin-bottom: 30px;
    color: #333;
}

/* Dal Section */
.dal-section {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    padding: 30px 40px;
    text-align: center;
}

.dal-section.show {
    display: block;
    animation: burgerAppear 0.5s ease forwards;
}

.dal-section h2 {
    font-size: 30px;
    margin-bottom: 30px;
    color: #333;
}

/* Traditional Food Section */
.traditional-section {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    padding: 30px 40px;
    text-align: center;
}

.traditional-section.show {
    display: block;
    animation: burgerAppear 0.5s ease forwards;
}

.traditional-section h2 {
    font-size: 30px;
    margin-bottom: 30px;
    color: #333;
}

/* Other Foods Section */
.other-foods-section {
    display: none;
    padding: 20px;
}

.other-foods-section.show {
    display: block;
    animation: burgerAppear 0.5s ease forwards;
}

.other-foods-section h2 {
    margin-bottom: 20px;
    font-size: 24px;
    color: #333;
}

.biryani-section {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    padding: 30px 40px;
    text-align: center;
}

.biryani-section.show {
    display: block;
    animation: burgerAppear 0.5s ease forwards;
}

.biryani-section h2 {
    font-size: 30px;
    margin-bottom: 30px;
    color: #333;
}

.pizza-section {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    padding: 30px 40px;
    text-align: center;
}

.pizza-section.show {
    display: block;
    animation: burgerAppear 0.5s ease forwards;
}

.pizza-section h2 {
    font-size: 30px;
    margin-bottom: 30px;
    color: #333;
}

@keyframes burgerAppear {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Cart */

.cart-section {
    padding: 40px;
    text-align: center;
    background-color: white;
}

#cart-items {
    margin: 20px auto;
    max-width: 500px;
}

#cart-items p {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

#cart-total {
    color: #ff6600;
}


/* Mobile */

@media (max-width: 600px) {

    .header {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
    }

    .nav-menu {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero {
        padding: 40px 15px;
    }

    .hero h1 {
        font-size: 26px;
    }

    .hero p {
        font-size: 16px;
    }

    .search-section {
        padding: 15px;
    }

    .search-section input {
        width: 100%;
    }

    .food-list {
        gap: 15px;
    }

    .food-card {
        width: 85%;
        max-width: 300px;
    }

    .category-list {
        gap: 10px;
    }

    .category-list button {
        padding: 12px 16px;
        font-size: 14px;
    }
}

/* Cart item */
.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Food name and price */
.cart-food-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.cart-food-info strong {
    font-size: 16px;
}

.cart-food-info span {
    font-size: 13px;
    color: #777;
    margin-top: 4px;
}

/* + and - controls */
.cart-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-controls button {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 20px;
}

.cart-controls span {
    min-width: 20px;
    text-align: center;
    font-weight: bold;
}

/* Item total */
.cart-item-total {
    min-width: 65px;
    text-align: right;
}

/* =========================
   KI KHABE CART
========================= */

.cart-section {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
}

.cart-section h2 {
    margin-bottom: 20px;
}

#cart-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
    padding: 15px;
    border-radius: 12px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.cart-food-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.cart-food-info strong {
    font-size: 17px;
}

.cart-food-info span {
    margin-top: 5px;
    font-size: 13px;
}

.cart-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 20px;
}

.cart-controls button {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 6px;
    font-size: 20px;
    cursor: pointer;
}

.cart-controls span {
    min-width: 25px;
    text-align: center;
    font-weight: bold;
}

.cart-item-total {
    min-width: 70px;
    text-align: right;
}

#cart-total {
    margin-top: 20px;
    text-align: right;
}

.cart-controls button {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #f1f1f1;
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

.cart-controls button:hover {
    transform: scale(1.1);
}

.cart-controls span {
    min-width: 30px;
    text-align: center;
    font-size: 17px;
    font-weight: bold;
}

#checkout-button {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 20px auto;
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
    background: #ff6b00;
    color: white;
    transition: 0.2s;
}

#checkout-button:hover {
    transform: translateY(-2px);
}

/* =========================
   CUSTOMER INFORMATION
========================= */

.customer-info {
    max-width: 600px;
    margin: 30px auto;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.customer-info h2 {
    margin-bottom: 20px;
}

.customer-info input,
.customer-info textarea {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 15px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
}

.customer-info textarea {
    min-height: 100px;
    resize: vertical;
}

.customer-info input:focus,
.customer-info textarea:focus {
    outline: none;
    border-color: #ff6b00;
}

/* =========================
   DELIVERY OPTION
========================= */

.delivery-option {
    margin-top: 10px;
}

.delivery-option h3 {
    margin-bottom: 12px;
}

.delivery-option label {
    display: block;
    margin-bottom: 10px;
    cursor: pointer;
    font-size: 15px;
}

.delivery-option input[type="radio"] {
    margin-right: 8px;
    cursor: pointer;
}

/* =========================
   ORDER CONFIRMATION
========================= */

.order-confirmation {
    display: none;
    max-width: 600px;
    margin: 30px auto;
    padding: 25px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
    border: 1px solid #eeeeee;
}

.order-confirmation h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 26px;
}

#confirmed-order-items {
    margin-top: 20px;
    padding: 15px;
    background: #f8f8f8;
    border-radius: 10px;
}

#confirmed-order-items p {
    margin: 8px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #dddddd;
}

#confirmed-order-total {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px solid #eeeeee;
    font-size: 22px;
}

#confirmed-order-type,
#confirmed-customer-name,
#confirmed-customer-phone,
#confirmed-customer-address {
    margin: 8px 0;
    font-size: 16px;
}

.remove-cart-item {
    background: transparent;
    border: none;
    color: #e74c3c;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    margin-left: 10px;
    padding: 5px 8px;
}

.remove-cart-item:hover {
    color: #c0392b;
    transform: scale(1.1);
}

.confirmation-message {
    text-align: center;
    margin-bottom: 20px;
    font-size: 16px;
    color: #666;
}

.back-to-menu {
    display: block;
    margin: 25px auto 5px;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
}

/* Cart Item Count Badge */

.cart-link {
    position: relative;
}

#cart-count {
    position: absolute;
    top: -8px;
    right: -8px;

    background: rgb(8, 147, 165);
    color: rgb(45, 9, 128);

    font-size: 11px;
    font-weight: bold;

    min-width: 17px;
    height: 17px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    padding: 2px;
}

/* =========================
   Admin Orders Dashboard
   ========================= */

#orders-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* =========================
   Modern Order Cards
   ========================= */

.order-card {
    position: relative;

    background: #ffffff;

    border-radius: 16px;

    padding: 22px;

    box-shadow:
        0 5px 18px rgba(0, 0, 0, 0.08);

    border-left: 5px solid #ff9800;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;

    overflow: hidden;
}

.order-card:hover {
    transform: translateY(-4px);

    box-shadow:
        0 10px 28px rgba(0, 0, 0, 0.12);
}

.order-card h3 {
    margin: 0 0 18px;

    font-size: 20px;

    font-weight: 700;

    color: #222;
}

.order-card p {
    margin: 10px 0;

    line-height: 1.5;

    font-size: 14px;

    color: #555;
}

.order-card p strong {
    color: #222;
}

/* =========================
   Order Status
   ========================= */

.order-status {
    margin-top: 20px;

    padding-top: 16px;

    border-top: 1px solid #eeeeee;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 10px;
}

.order-status strong {
    font-size: 14px;

    color: #444;
}

.order-status select {
    padding: 9px 14px;

    border-radius: 8px;

    border: 1px solid #ddd;

    font-size: 14px;

    font-weight: 600;

    cursor: pointer;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.order-status select:focus {
    border-color: #ff9800;

    box-shadow:
        0 0 0 3px rgba(255, 152, 0, 0.15);
}

/* =========================
   Status Colors
   ========================= */

.status-select.pending {
    background-color: #fff3cd;

    color: #856404;

    border-color: #ffe69c;
}

.status-select.preparing {
    background-color: #cfe2ff;

    color: #084298;

    border-color: #9ec5fe;
}

.status-select.ready {
    background-color: #d1e7dd;

    color: #0f5132;

    border-color: #a3cfbb;
}

.status-select.delivered {
    background-color: #e2d9f3;

    color: #432874;

    border-color: #c5b3e6;
}

/* Mobile */

@media (max-width: 500px) {

    .order-status {
        flex-direction: column;

        align-items: stretch;
    }

    .order-status select {
        width: 100%;
    }

}

/* =========================
   Order Card Header
   ========================= */

.order-card-header {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 12px;

    margin-bottom: 18px;

    padding-bottom: 14px;

    border-bottom: 1px solid #eeeeee;
}

.order-card-header h3 {
    margin: 0;

    font-size: 20px;

    font-weight: 700;

    color: #222;
}

/* Status Badge */

.order-status-badge {
    display: inline-flex;

    align-items: center;

    padding: 6px 11px;

    border-radius: 20px;

    font-size: 12px;

    font-weight: 700;

    white-space: nowrap;
}

.order-status-badge.pending {
    background: #fff3cd;

    color: #856404;
}

.order-status-badge.preparing {
    background: #cfe2ff;

    color: #084298;
}

.order-status-badge.ready {
    background: #d1e7dd;

    color: #0f5132;
}

.order-status-badge.delivered {
    background: #e2d9f3;

    color: #432874;
}

/* Mobile */

@media (max-width: 500px) {

    .order-card-header {
        align-items: flex-start;

        flex-direction: column;
    }

}

.status-select.pending {
    background-color: #fff3cd;
}

.status-select.preparing {
    background-color: #cfe2ff;
}

.status-select.ready {
    background-color: #d1e7dd;
}

.status-select.delivered {
    background-color: #e2d9f3;
}

/* =========================
   Modern Order Summary
   ========================= */

.order-summary {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 18px;

    margin: 25px 0;
}

.summary-card {
    position: relative;

    background: #ffffff;

    padding: 20px;

    border-radius: 14px;

    text-align: left;

    box-shadow:
        0 5px 18px rgba(0, 0, 0, 0.08);

    border-left: 5px solid #ff9800;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;

    overflow: hidden;
}

.summary-card:hover {
    transform: translateY(-4px);

    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.12);
}

.summary-card h3 {
    margin: 0 0 12px;

    font-size: 15px;

    font-weight: 600;

    color: #666;
}

.summary-card span {
    display: block;

    font-size: 34px;

    font-weight: 700;

    color: #222;
}

/* Decorative number background */

.summary-card::after {
    content: "";

    position: absolute;

    width: 70px;
    height: 70px;

    right: -20px;
    bottom: -20px;

    border-radius: 50%;

    background: rgba(255, 152, 0, 0.08);
}

/* Individual status colors */

.pending-summary {
    border-left-color: #ffb300;
}

.preparing-summary {
    border-left-color: #2196f3;
}

.ready-summary {
    border-left-color: #4caf50;
}

.delivered-summary {
    border-left-color: #673ab7;
}

/* Mobile */

@media (max-width: 900px) {

    .order-summary {
        grid-template-columns:
            repeat(2, 1fr);
    }

}

@media (max-width: 500px) {

    .order-summary {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 700px) {

    .order-summary {
        grid-template-columns: repeat(2, 1fr);
    }

}

/* =========================
   Stylish Admin Header
   ========================= */

.admin-header {
    position: relative;
    width: 100%;
    box-sizing: border-box;

    padding: 28px 32px;
    margin-bottom: 25px;

    background: linear-gradient(
        135deg,
        #ff7a18,
        #ff3d00
    );

    color: #ffffff;

    border-radius: 16px;

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.15);

    overflow: hidden;
}

.admin-header::after {
    content: "🍔";

    position: absolute;

    right: 180px;
    top: -25px;

    font-size: 120px;

    opacity: 0.12;

    transform: rotate(-15deg);
}

.admin-header h1 {
    margin: 0;

    font-size: 32px;
    font-weight: 700;

    letter-spacing: 0.5px;
}

.admin-header p {
    margin: 6px 0 0;

    font-size: 16px;

    opacity: 0.9;

    letter-spacing: 0.3px;
}

.admin-header .logout-button {
    position: absolute;

    top: 50%;
    right: 30px;

    transform: translateY(-50%);

    padding: 11px 20px;

    border: 1px solid rgba(255, 255, 255, 0.35);

    border-radius: 10px;

    background: rgba(255, 255, 255, 0.15);

    color: #ffffff;

    backdrop-filter: blur(8px);

    cursor: pointer;

    font-size: 15px;
    font-weight: 600;

    transition: all 0.25s ease;
}

.admin-header .logout-button:hover {
    background: rgba(255, 255, 255, 0.28);

    transform:
        translateY(-50%)
        translateY(-2px);

    box-shadow:
        0 5px 15px rgba(0, 0, 0, 0.15);
}

.admin-header .logout-button:active {
    transform:
        translateY(-50%)
        scale(0.97);
}

/* Mobile */

@media (max-width: 600px) {

    .admin-header {
        padding: 22px 20px;
        padding-bottom: 75px;
    }

    .admin-header h1 {
        font-size: 26px;
    }

    .admin-header p {
        font-size: 14px;
    }

    .admin-header .logout-button {
        top: auto;
        bottom: 18px;
        left: 20px;
        right: auto;

        transform: none;
    }

    .admin-header .logout-button:hover {
        transform: translateY(-2px);
    }

}

/* =========================
   Order Search & Filter
   ========================= */

.order-search {
    display: flex;

    gap: 12px;

    margin: 25px 0 20px;
}

.order-search input {
    flex: 1;

    min-width: 0;

    box-sizing: border-box;

    padding: 14px 18px;

    border: 1px solid #ddd;

    border-radius: 12px;

    background: #ffffff;

    font-size: 15px;

    outline: none;

    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.06);

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.order-search input:focus {
    border-color: #ff9800;

    box-shadow:
        0 0 0 3px rgba(255, 152, 0, 0.15);
}

.order-search input::placeholder {
    color: #999;
}

.order-search select {
    width: 190px;

    padding: 14px 15px;

    border: 1px solid #ddd;

    border-radius: 12px;

    background: #ffffff;

    font-size: 15px;

    font-weight: 600;

    color: #444;

    cursor: pointer;

    outline: none;

    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.06);

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.order-search select:focus {
    border-color: #ff9800;

    box-shadow:
        0 0 0 3px rgba(255, 152, 0, 0.15);
}

/* Mobile */

@media (max-width: 600px) {

    .order-search {
        flex-direction: column;
    }

    .order-search select {
        width: 100%;
    }

}

/* Reset Filter Button */

.reset-filter-button {
    padding: 14px 18px;

    border: 1px solid #ddd;

    border-radius: 12px;

    background: #ffffff;

    color: #555;

    font-size: 15px;

    font-weight: 600;

    cursor: pointer;

    white-space: nowrap;

    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.06);

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.reset-filter-button:hover {
    background: #ff9800;

    color: #ffffff;

    border-color: #ff9800;

    transform: translateY(-2px);
}

.reset-filter-button:active {
    transform: scale(0.97);
}

@media (max-width: 600px) {

    .reset-filter-button {
        width: 100%;
    }

}

/* =========================
   New Order Notification
   ========================= */

.new-order-notification {
    display: none;

    margin: 20px 0;

    padding: 14px 18px;

    border-radius: 12px;

    background: #fff3cd;

    color: #856404;

    border: 1px solid #ffe69c;

    font-size: 15px;

    font-weight: 600;

    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.06);

    animation: notificationAppear 0.3s ease;
}

@keyframes notificationAppear {

    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}

/* =========================
   New Order Highlight
   ========================= */

.order-card.new-order-highlight {
    animation: newOrderPulse 1s ease-in-out 3;

    border-left-color: #ff3d00;

    box-shadow:
        0 0 0 3px rgba(255, 61, 0, 0.15),
        0 10px 30px rgba(255, 61, 0, 0.18);
}

@keyframes newOrderPulse {

    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.015);
    }

    100% {
        transform: scale(1);
    }

}

/* =========================
   Print Order Button
   ========================= */

.print-order-button {
    width: 100%;

    margin-top: 15px;

    padding: 11px 16px;

    border: 1px solid #ddd;

    border-radius: 10px;

    background: #ffffff;

    color: #444;

    font-size: 14px;

    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.print-order-button:hover {
    background: #222;

    color: #ffffff;

    border-color: #222;

    transform: translateY(-2px);
}

.print-order-button:active {
    transform: scale(0.98);
}

.tracking-card {
    max-width: 600px;
    margin: 30px auto;
    padding: 25px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.tracking-card h3 {
    text-align: center;
    margin-bottom: 25px;
}

.tracking-status {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.tracking-step {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: 10px;
    background: #f1f1f1;
    opacity: 0.5;
}

.tracking-step.active {
    opacity: 1;
    background: #e8f5e9;
    border: 2px solid #4caf50;
    transform: scale(1.02);
}

.tracking-icon {
    font-size: 28px;
}

.tracking-step strong {
    font-size: 18px;
}

.tracking-step p {
    margin: 5px 0 0;
    color: #666;
}

.tracking-step.completed {
    opacity: 1;
    background: #e8f5e9;
    border-left: 5px solid #4caf50;
}

.tracking-step.completed .tracking-icon {
    color: #2e7d32;
}

.tracking-step.upcoming {
    opacity: 0.4;
    background: #f1f1f1;
}

.tracking-step.active {
    opacity: 1;
    background: #fff8e1;
    border: 2px solid #ff9800;
    transform: scale(1.02);
}

/* Ki Khabe delivery map */
.delivery-map {
    width: 100%;
    height: 55vh;
    min-height: 320px;
    max-height: 550px;
    border-radius: 12px;
    margin-top: 20px;
    overflow: hidden;
}

/* Mobile phones */
@media (max-width: 600px) {
    .delivery-map {
        height: 55vh;
        min-height: 350px;
        max-height: 500px;
        border-radius: 10px;
        margin-top: 15px;
    }
}


/* Delivery route information */
#route-information {
    margin-top: 16px;
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f8fafc;
    color: #1f2937;
    font-size: 15px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

/* Keep route details readable on phones */
@media (max-width: 600px) {
    #route-information {
        margin-top: 12px;
        padding: 12px;
        font-size: 14px;
        line-height: 1.8;
    }
}


/* ===== Ki Khabe Rider Authentication ===== */

.rider-auth-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    box-sizing: border-box;
    background: #fff7ed;
}

.rider-auth-card {
    width: 100%;
    max-width: 440px;
    padding: 30px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
}

.rider-auth-card h1 {
    margin: 0 0 8px;
    color: #ea580c;
    text-align: center;
    font-size: 30px;
}

.rider-auth-card h2 {
    margin: 12px 0 8px;
    text-align: center;
    color: #1f2937;
}

.rider-auth-card > p {
    color: #6b7280;
    text-align: center;
    line-height: 1.6;
}

.rider-auth-card label {
    display: block;
    margin: 16px 0 7px;
    color: #374151;
    font-weight: 600;
}

.rider-auth-card input {
    display: block;
    width: 100%;
    min-height: 46px;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 9px;
    box-sizing: border-box;
    font-size: 16px;
    background: #ffffff;
}

.rider-auth-card input:focus {
    outline: 2px solid #fdba74;
    border-color: #ea580c;
}

.rider-auth-card button {
    width: 100%;
    min-height: 48px;
    margin-top: 24px;
    border: none;
    border-radius: 9px;
    background: #ea580c;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.rider-auth-card button:hover {
    background: #c2410c;
}

.rider-auth-footer {
    margin-top: 22px;
    text-align: center;
    font-size: 14px;
}

.rider-auth-footer a {
    color: #ea580c;
    font-weight: 700;
    text-decoration: none;
}

.rider-auth-footer a:hover {
    text-decoration: underline;
}

#registration-message {
    overflow-wrap: anywhere;
    font-size: 14px;
}

@media (max-width: 480px) {
    .rider-auth-card {
        padding: 22px 18px;
    }
}

/* Rider approval notification */
.rider-approval-message {
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    color: #9a3412;
    border: 1px solid #fdba74;
    border-left: 5px solid #f97316;
    border-radius: 12px;
    padding: 16px 18px;
    margin-top: 18px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.6;
    text-align: center;
    box-shadow: 0 4px 12px rgba(154, 52, 18, 0.08);
    animation: approvalMessageIn 0.35s ease-out;
}

.rider-approval-message .approval-icon {
    display: block;
    font-size: 28px;
    margin-bottom: 6px;
}

@keyframes approvalMessageIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Rider Login Footer Links */
.rider-auth-footer {
    margin-top: 18px;
    text-align: center;
    font-size: 14px;
    color: #666;
}

.rider-auth-footer a {
    display: inline-block;
    margin-top: 6px;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.25s ease;
}

/* Register button */
.rider-auth-footer:first-of-type a {
    background: #f97316;
    color: white;
    border: 1px solid #f97316;
}

.rider-auth-footer:first-of-type a:hover {
    background: #ea580c;
    transform: translateY(-2px);
}

/* Back to Ki Khabe button */
.rider-auth-footer:last-of-type a {
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
}

.rider-auth-footer:last-of-type a:hover {
    background: #f3f4f6;
    border-color: #f97316;
    transform: translateY(-2px);
}


/* =========================================
   KI KHABE — PROFESSIONAL GREEN DELIVERY UI
   CSS only: preserve existing JavaScript
========================================= */

:root {
    --delivery-green: #15803d;
    --delivery-green-dark: #166534;
    --delivery-green-light: #f0fdf4;
    --delivery-text: #17211b;
    --delivery-muted: #647067;
    --delivery-border: #e2e8e3;
    --delivery-surface: #ffffff;
    --delivery-page: #f5f8f5;
}

/* Delivery page */
body:has(.accepted-order-card) {
    background: var(--delivery-page);
    color: var(--delivery-text);
}

/* Order and map side-by-side layout.
   These rules activate when both elements share a parent. */
#accepted-orders-list,
#accepted-orders-container {
    min-width: 0;
}

#delivery-map {
    width: 100%;
    min-height: 420px;
    border: 1px solid var(--delivery-border);
    border-radius: 16px;
    overflow: hidden;
    background: #eaf2eb;
    box-shadow: 0 5px 18px rgba(22, 101, 52, 0.08);
}

/* Order cards */
.accepted-order-card {
    min-width: 0;
    padding: 20px;
    margin-bottom: 16px;
    background: var(--delivery-surface);
    border: 1px solid var(--delivery-border);
    border-left: 4px solid var(--delivery-green);
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(20, 50, 28, 0.05);
    transition: box-shadow 0.2s ease;
}

.accepted-order-card:hover {
    box-shadow: 0 8px 22px rgba(20, 50, 28, 0.09);
}

.accepted-order-card h3 {
    margin: 0 0 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--delivery-border);
    color: var(--delivery-green-dark);
    font-size: 18px;
    font-weight: 750;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.accepted-order-card p {
    margin: 10px 0;
    color: var(--delivery-muted);
    font-size: 14px;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

/* Delivery action buttons */
.accepted-order-card button {
    min-height: 42px;
    padding: 10px 15px;
    margin: 10px 8px 0 0;
    border: 1px solid var(--delivery-green);
    border-radius: 9px;
    background: var(--delivery-green);
    color: #ffffff;
    font-size: 14px;
    font-weight: 650;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.accepted-order-card button:hover {
    background: var(--delivery-green-dark);
    border-color: var(--delivery-green-dark);
}

.accepted-order-card button:focus-visible {
    outline: 3px solid #86efac;
    outline-offset: 3px;
}

.accepted-order-card button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Leaflet controls remain clickable above the map */
#delivery-map .leaflet-control {
    z-index: 500;
}

#delivery-map .leaflet-control-zoom a {
    color: var(--delivery-green-dark);
}

/* Responsive layout */
@media (max-width: 700px) {
    #delivery-map {
        min-height: 300px;
        border-radius: 12px;
    }

    .accepted-order-card {
        padding: 15px;
        border-radius: 12px;
    }

    .accepted-order-card button {
        width: 100%;
        margin: 8px 0 0;
    }
}


/* ===== Delivery page: Professional Green Layout ===== */

#delivery-result {
    box-sizing: border-box;
    min-width: 0;
    padding: 22px;
    background: #ffffff;
    border: 1px solid #dce8df;
    border-radius: 16px;
    box-shadow: 0 5px 18px rgba(22, 101, 52, 0.07);
}

#delivery-map {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 420px;
    border: 1px solid #dce8df;
    border-radius: 16px;
    overflow: hidden;
    background: #edf5ef;
    box-shadow: 0 5px 18px rgba(22, 101, 52, 0.07);
}

#route-information {
    box-sizing: border-box;
    margin-top: 16px;
    padding: 14px 18px;
    color: #365443;
    background: #f0fdf4;
    border: 1px solid #d1fae5;
    border-radius: 12px;
    line-height: 1.6;
}

/* Responsive map */
@media (max-width: 700px) {
    #delivery-result {
        padding: 16px;
        border-radius: 12px;
    }

    #delivery-map {
        min-height: 300px;
        border-radius: 12px;
    }
}


/* ===== Ki Khabe Delivery Dashboard ===== */

main:has(#delivery-map) {
    max-width: 1440px;
    margin: 0 auto;
    padding: 28px;
    background: #f5f8f5;
    color: #17251b;
}

main:has(#delivery-map) > h2 {
    margin: 0 0 8px;
    color: #166534;
    font-size: 28px;
    font-weight: 750;
}

main:has(#delivery-map) > p {
    margin: 0 0 24px;
    color: #647067;
    line-height: 1.6;
}

/* Delivery order sections: consistent full-width cards */
main:has(#delivery-map) > .available-orders-section,
main:has(#delivery-map) > .running-orders-section,
main:has(#delivery-map) > .my-accepted-orders-section {
    display: block;
    box-sizing: border-box;
    width: 100%;
    margin: 0 0 20px;
    padding: 22px;
    background: #ffffff;
    border: 1px solid #dce8df;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(22, 101, 52, 0.06);
}

#toggle-available-orders {
    width: 100%;
    min-height: 52px;
    text-align: left;
}

main:has(#delivery-map) > .my-accepted-orders-section {
    margin-right: 0;
}

main:has(#delivery-map) section h2 {
    margin: 0 0 16px;
    color: #166534;
    font-size: 19px;
}

/* Order lists */
#available-orders-list,
#my-accepted-orders-list {
    min-width: 0;
    overflow-wrap: anywhere;
}

/* Refresh and Start Delivery buttons */
main:has(#delivery-map) button {
    min-height: 42px;
    padding: 10px 16px;
    border: 1px solid #15803d;
    border-radius: 9px;
    background: #15803d;
    color: #ffffff;
    font-size: 14px;
    font-weight: 650;
    cursor: pointer;
    transition: background 0.2s ease;
}

main:has(#delivery-map) button:hover {
    background: #166534;
}

main:has(#delivery-map) button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Order ID input */
main:has(#delivery-map) .order-search {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 4px 0 22px;
}

main:has(#delivery-map) #delivery-order-id {
    box-sizing: border-box;
    flex: 1 1 240px;
    min-width: 0;
    min-height: 44px;
    padding: 11px 14px;
    border: 1px solid #cbd8ce;
    border-radius: 9px;
    background: #ffffff;
    color: #17251b;
    font-size: 15px;
}

main:has(#delivery-map) #delivery-order-id:focus {
    outline: 3px solid #bbf7d0;
    border-color: #15803d;
}

/* Delivery information and map side by side */
main:has(#delivery-map) #delivery-result,
main:has(#delivery-map) #delivery-map {
    display: inline-block;
    vertical-align: top;
    box-sizing: border-box;
    width: calc(50% - 10px);
    min-width: 0;
    margin: 0 12px 18px 0;
    border: 1px solid #dce8df;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(22, 101, 52, 0.06);
}

main:has(#delivery-map) #delivery-result {
    padding: 20px;
    overflow-wrap: anywhere;
}

main:has(#delivery-map) #delivery-map {
    min-height: 420px;
    margin-right: 0;
    overflow: hidden;
    background: #edf5ef;
}

/* Route details */
main:has(#delivery-map) #route-information {
    margin-top: 4px;
    padding: 16px 18px;
    border: 1px solid #d1fae5;
    border-radius: 12px;
    background: #f0fdf4;
    color: #365443;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

/* Responsive mobile layout */
@media (max-width: 760px) {
    main:has(#delivery-map) {
        padding: 16px;
    }

    main:has(#delivery-map) > .available-orders-section,
    main:has(#delivery-map) > .my-accepted-orders-section,
    main:has(#delivery-map) #delivery-result,
    main:has(#delivery-map) #delivery-map {
        display: block;
        width: 100%;
        margin: 0 0 16px;
    }

    main:has(#delivery-map) > .available-orders-section,
    main:has(#delivery-map) > .my-accepted-orders-section {
        padding: 16px;
    }

    main:has(#delivery-map) #delivery-map {
        min-height: 320px;
    }

    main:has(#delivery-map) .order-search {
        flex-direction: column;
    }

    main:has(#delivery-map) .order-search button {
        width: 100%;
    }
}


/* Compact, collapsible order history */
main:has(#delivery-map) details.order-history {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 20px;
    padding: 16px 20px;
    background: #ffffff;
    border: 1px solid #dce8df;
    border-radius: 14px;
    box-shadow: 0 3px 12px rgba(22, 101, 52, 0.05);
}

main:has(#delivery-map) details.order-history > summary {
    color: #166534;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    padding: 4px 0;
}

main:has(#delivery-map) details.order-history[open] > summary {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #dce8df;
}

main:has(#delivery-map) details.order-history > #refresh-accepted-orders-button {
    margin-bottom: 12px;
}

main:has(#delivery-map) details.order-history:not([open]) {
    padding-top: 12px;
    padding-bottom: 12px;
}


/* ===== Rider Dashboard Header ===== */

body:has(#rider-logout-button) .admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 28px;
    background: linear-gradient(135deg, #14532d, #15803d);
    color: #ffffff;
    border-radius: 0 0 18px 18px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

body:has(#rider-logout-button) .admin-header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 0.3px;
}

body:has(#rider-logout-button) .admin-header p {
    margin: 6px 0 0;
    color: #dcfce7;
    font-size: 15px;
    font-weight: 500;
}

body:has(#rider-logout-button) #rider-logout-button {
    flex-shrink: 0;
    padding: 11px 17px;
    background: #ffffff;
    color: #166534;
    border: 1px solid #dcfce7;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

body:has(#rider-logout-button) #rider-logout-button:hover {
    background: #dcfce7;
    transform: translateY(-1px);
}

@media (max-width: 480px) {
    body:has(#rider-logout-button) .admin-header {
        padding: 16px;
        gap: 10px;
    }

    body:has(#rider-logout-button) .admin-header h1 {
        font-size: 21px;
    }

    body:has(#rider-logout-button) .admin-header p {
        font-size: 13px;
    }

    body:has(#rider-logout-button) #rider-logout-button {
        padding: 9px 11px;
        font-size: 12px;
    }
}


/* ===== Available Orders: Rider Dashboard ===== */

body:has(#rider-logout-button) .available-orders-section {
    margin: 24px 0;
    padding: 24px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 5px 18px rgba(15, 23, 42, 0.06);
}

body:has(#rider-logout-button) .available-orders-section h2 {
    margin: 0 0 18px;
    color: #14532d;
    font-size: 23px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

body:has(#rider-logout-button) #refresh-orders-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 11px 17px;
    background: #15803d;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

body:has(#rider-logout-button) #refresh-orders-button:hover {
    background: #166534;
    transform: translateY(-1px);
}

body:has(#rider-logout-button) #available-orders-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 18px;
    align-items: start;
    color: #64748b;
    line-height: 1.6;
}

@media (max-width: 480px) {
    body:has(#rider-logout-button) .available-orders-section {
        margin: 16px 0;
        padding: 16px;
        border-radius: 14px;
    }

    body:has(#rider-logout-button) .available-orders-section h2 {
        font-size: 20px;
    }

    body:has(#rider-logout-button) #refresh-orders-button {
        width: 100%;
    }

    body:has(#rider-logout-button) #available-orders-list {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}


/* ===== Available Order Cards ===== */

body:has(#rider-logout-button) .available-order-card {
    min-width: 0;
    padding: 20px;
    background: #f8fafc;
    border: 1px solid #dbe7df;
    border-left: 5px solid #16a34a;
    border-radius: 14px;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.04);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    overflow-wrap: anywhere;
}

body:has(#rider-logout-button) .available-order-card:hover {
    box-shadow: 0 8px 20px rgba(21, 128, 61, 0.10);
    transform: translateY(-2px);
}

body:has(#rider-logout-button) .available-order-card h3 {
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #dbe7df;
    color: #166534;
    font-size: 18px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

body:has(#rider-logout-button) .available-order-card p {
    margin: 10px 0;
    color: #334155;
    font-size: 14px;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

body:has(#rider-logout-button) .available-order-card button {
    width: 100%;
    margin-top: 12px;
    padding: 12px 16px;
    background: #15803d;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease;
}

body:has(#rider-logout-button) .available-order-card button:hover:not(:disabled) {
    background: #166534;
}

body:has(#rider-logout-button) .available-order-card button:disabled {
    opacity: 0.65;
    cursor: wait;
}


/* ===== Running Orders Section ===== */

body:has(#rider-logout-button) .running-orders-section {
    margin: 24px 0;
    padding: 24px;
    background: #ffffff;
    border: 1px solid #dbe7df;
    border-radius: 18px;
    box-shadow: 0 5px 18px rgba(15, 23, 42, 0.06);
}

body:has(#rider-logout-button) .running-orders-section h2 {
    margin: 0 0 10px;
    color: #14532d;
    font-size: 23px;
    font-weight: 800;
}

body:has(#rider-logout-button) .running-orders-section > p {
    margin: 0 0 20px;
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
}

body:has(#rider-logout-button) #running-orders-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 18px;
    align-items: start;
    color: #64748b;
    line-height: 1.6;
}

body:has(#rider-logout-button) #running-orders-list .accepted-order-card {
    min-width: 0;
    padding: 20px;
    background: #f8fafc;
    border: 1px solid #dbe7df;
    border-left: 5px solid #0d9488;
    border-radius: 14px;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.04);
    overflow-wrap: anywhere;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

body:has(#rider-logout-button) #running-orders-list .accepted-order-card:hover {
    box-shadow: 0 8px 20px rgba(13, 148, 136, 0.10);
    transform: translateY(-2px);
}

body:has(#rider-logout-button) #running-orders-list .accepted-order-card h3 {
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #dbe7df;
    color: #115e59;
    font-size: 18px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

body:has(#rider-logout-button) #running-orders-list .accepted-order-card p {
    margin: 10px 0;
    color: #334155;
    font-size: 14px;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

body:has(#rider-logout-button) #running-orders-list .accepted-order-card button {
    width: 100%;
    margin-top: 12px;
    padding: 12px 16px;
    background: #0f766e;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease;
}

body:has(#rider-logout-button) #running-orders-list .accepted-order-card button:hover:not(:disabled) {
    background: #115e59;
}

body:has(#rider-logout-button) #running-orders-list .accepted-order-card button:disabled {
    opacity: 0.65;
    cursor: wait;
}

@media (max-width: 480px) {
    body:has(#rider-logout-button) .running-orders-section {
        margin: 16px 0;
        padding: 16px;
        border-radius: 14px;
    }

    body:has(#rider-logout-button) .running-orders-section h2 {
        font-size: 20px;
    }

    body:has(#rider-logout-button) #running-orders-list {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}


/* ===== Order Acceptance History ===== */

body:has(#rider-logout-button) details.order-history {
    margin: 24px 0;
    padding: 20px 24px;
    background: #ffffff;
    border: 1px solid #dbe7df;
    border-radius: 16px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

body:has(#rider-logout-button) details.order-history > summary {
    padding: 4px 0;
    color: #14532d;
    font-size: 19px;
    font-weight: 800;
    cursor: pointer;
    line-height: 1.5;
}

body:has(#rider-logout-button) details.order-history > summary::marker {
    color: #15803d;
}

body:has(#rider-logout-button) #refresh-accepted-orders-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 18px 0;
    padding: 11px 16px;
    background: #15803d;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease;
}

body:has(#rider-logout-button) #refresh-accepted-orders-button:hover:not(:disabled) {
    background: #166534;
}

body:has(#rider-logout-button) #refresh-accepted-orders-button:disabled {
    opacity: 0.65;
    cursor: wait;
}

body:has(#rider-logout-button) #my-accepted-orders-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 16px;
    align-items: start;
    color: #64748b;
    line-height: 1.6;
}

body:has(#rider-logout-button) #my-accepted-orders-list .accepted-order-card {
    min-width: 0;
    padding: 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 5px solid #64748b;
    border-radius: 12px;
    overflow-wrap: anywhere;
}

body:has(#rider-logout-button) #my-accepted-orders-list .accepted-order-card h3 {
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
    font-size: 17px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

body:has(#rider-logout-button) #my-accepted-orders-list .accepted-order-card p {
    margin: 9px 0;
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

@media (max-width: 480px) {
    body:has(#rider-logout-button) details.order-history {
        margin: 16px 0;
        padding: 16px;
    }

    body:has(#rider-logout-button) details.order-history > summary {
        font-size: 17px;
    }

    body:has(#rider-logout-button) #refresh-accepted-orders-button {
        width: 100%;
    }

    body:has(#rider-logout-button) #my-accepted-orders-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}


/* ===== Delivery Information Panel ===== */

body:has(#rider-logout-button) #delivery-result {
    margin: 24px 0;
    padding: 22px 24px;
    background: linear-gradient(135deg, #f0fdf4, #ffffff);
    border: 1px solid #bbf7d0;
    border-left: 5px solid #15803d;
    border-radius: 16px;
    box-shadow: 0 5px 16px rgba(21, 128, 61, 0.07);
    color: #334155;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

body:has(#rider-logout-button) #delivery-result > p {
    margin: 0;
    color: #166534;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.7;
}

body:has(#rider-logout-button) #delivery-result h2,
body:has(#rider-logout-button) #delivery-result h3 {
    margin: 0 0 14px;
    color: #14532d;
    font-weight: 800;
}

body:has(#rider-logout-button) #delivery-result button {
    max-width: 100%;
    margin-top: 12px;
    padding: 10px 15px;
    border: none;
    border-radius: 9px;
    background: #15803d;
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
}

body:has(#rider-logout-button) #delivery-result button:hover:not(:disabled) {
    background: #166534;
}

@media (max-width: 480px) {
    body:has(#rider-logout-button) #delivery-result {
        margin: 16px 0;
        padding: 17px;
        border-radius: 13px;
    }
}


/* ===== Rider Route Information ===== */

body:has(#rider-logout-button) #route-information {
    margin: 16px 0 24px;
    padding: 16px 20px;
    min-height: 24px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-left: 5px solid #15803d;
    border-radius: 12px;
    color: #166534;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.7;
    overflow-wrap: anywhere;
    transition: background 0.2s ease;
}

@media (max-width: 480px) {
    body:has(#rider-logout-button) #route-information {
        margin: 12px 0 18px;
        padding: 14px 15px;
        font-size: 13px;
        border-radius: 10px;
    }
}


/* ===== Delivery Area Layout Adjustment ===== */

main:has(#delivery-map) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 20px;
    align-items: start;
}

/* Keep the dashboard introduction full width */
main:has(#delivery-map) > h2,
main:has(#delivery-map) > p,
main:has(#delivery-map) > .order-search {
    grid-column: 1 / -1;
}

/* Place delivery information and map in the same row */
main:has(#delivery-map) #delivery-result {
    grid-column: 1;
    width: 100%;
    margin: 0 0 16px;
}

main:has(#delivery-map) #delivery-map {
    grid-column: 2;
    width: 100%;
    margin: 0 0 16px;
}

/* Route information stays directly below the map */
main:has(#delivery-map) #route-information {
    grid-column: 2;
    width: 100%;
    margin: 0;
}

@media (max-width: 760px) {
    main:has(#delivery-map) {
        grid-template-columns: minmax(0, 1fr);
    }

    main:has(#delivery-map) #delivery-result,
    main:has(#delivery-map) #delivery-map,
    main:has(#delivery-map) #route-information {
        grid-column: 1;
        width: 100%;
    }
}


.track-my-order-button {
    display: block;
    width: 100%;
    max-width: 320px;
    margin: 18px auto 24px;
    padding: 14px 20px;
    background: #ff6b00;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.22);
    transition: background 0.2s ease, transform 0.2s ease;
}

.track-my-order-button:hover {
    background: #e65c00;
    transform: translateY(-2px);
}

/* Track Order search layout */
.order-search:has(#track-order-id) {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    max-width: 520px;
    margin: 20px auto;
}

#track-order-id {
    flex: 1;
    min-width: 0;
    width: auto;
    box-sizing: border-box;
    padding: 12px 14px;
    font-size: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.order-search:has(#track-order-id) .reset-filter-button {
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 12px 16px;
    background: #ff6b00;
    color: white;
    border: 1px solid #ff6b00;
    border-radius: 8px;
    font-size: 15px;
}

.order-search:has(#track-order-id) .reset-filter-button:hover {
    background: #e65f00;
    border-color: #e65f00;
}

@media (max-width: 480px) {
    .order-search:has(#track-order-id) {
        gap: 8px;
    }

    .order-search:has(#track-order-id) .reset-filter-button {
        padding: 12px 10px;
        font-size: 14px;
    }
}


/* Keep My Recent Orders below the search row */
.order-search:has(#track-order-id) #saved-orders-section {
    flex: 0 0 100%;
    width: 100%;
    box-sizing: border-box;
}


/* Track Order: search row and recent orders */
.order-search:has(#track-order-id) {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    max-width: 520px;
    margin: 20px auto;
}

.order-search:has(#track-order-id) #saved-orders-section {
    flex: 0 0 100%;
    width: 100%;
    margin-top: 10px;
    box-sizing: border-box;
}

.order-search:has(#track-order-id) #track-order-id {
    flex: 1 1 200px;
}

.order-search:has(#track-order-id) .reset-filter-button {
    flex: 0 0 auto;
    width: auto;
    margin: 0;
}


/* Track Order Home Button */
.track-home-container {
    width: 100%;
    max-width: 1100px;
    margin: 15px auto;
    padding: 0 15px;
    box-sizing: border-box;
}

.track-home-button {
    display: inline-block;
    padding: 10px 18px;
    background: #ff6b00;
    color: #ffffff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.track-home-button:hover {
    background: #e65f00;
}


.track-home-container {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.track-home-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    background: #ff6b00;
    color: #ffffff;
    border: 1px solid #ff6b00;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.track-home-button:hover {
    background: #e65f00;
    border-color: #e65f00;
}


/* Modern Show / Hide Buttons */

.toggle-order-status,
#toggle-saved-orders {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 12px 20px;
    min-height: 44px;

    background: linear-gradient(135deg, #ff8a00, #ff6b00);
    color: #ffffff;

    border: none;
    border-radius: 12px;

    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.2px;

    cursor: pointer;
    box-shadow: 0 4px 10px rgba(255, 107, 0, 0.18);

    transition:
        background 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

/* Hover effect */
.toggle-order-status:hover,
#toggle-saved-orders:hover {
    background: linear-gradient(135deg, #f07800, #e65f00);
    box-shadow: 0 6px 14px rgba(255, 107, 0, 0.25);
    transform: translateY(-1px);
}

/* Click effect */
.toggle-order-status:active,
#toggle-saved-orders:active {
    transform: scale(0.97);
    box-shadow: 0 2px 5px rgba(255, 107, 0, 0.18);
}

/* Keyboard accessibility */
.toggle-order-status:focus-visible,
#toggle-saved-orders:focus-visible {
    outline: 3px solid rgba(255, 107, 0, 0.35);
    outline-offset: 3px;
}

/* Mobile layout */
@media (max-width: 480px) {
    .toggle-order-status,
    #toggle-saved-orders {
        padding: 11px 14px;
        font-size: 13px;
        border-radius: 10px;
    }
}


/* Follow Rider Button */
#follow-rider-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    margin-bottom: 14px !important;
    padding: 13px 22px;

    background: linear-gradient(135deg, #ff8a00, #ff6b00);
    color: #ffffff;

    border: none;
    border-radius: 12px;

    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.2px;

    cursor: pointer;
    box-shadow: 0 5px 14px rgba(255, 107, 0, 0.24);

    transition:
        background 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

#follow-rider-button:hover {
    background: linear-gradient(135deg, #f07800, #e65f00);
    box-shadow: 0 7px 18px rgba(255, 107, 0, 0.32);
    transform: translateY(-2px);
}

#follow-rider-button:active {
    transform: scale(0.97);
    box-shadow: 0 2px 6px rgba(255, 107, 0, 0.2);
}

#follow-rider-button:focus-visible {
    outline: 3px solid rgba(255, 107, 0, 0.35);
    outline-offset: 3px;
}

@media (max-width: 480px) {
    #follow-rider-button {
        width: 100%;
        padding: 13px 16px;
        font-size: 14px;
    }
}


/* Delivery page: compact mobile search */
@media (max-width: 600px) {
    main:has(#delivery-map) .order-search:has(#delivery-order-id) {
        display: flex;
        flex-direction: row;
        align-items: stretch;
        gap: 8px;
        width: 100%;
        max-width: 100%;
        margin: 16px 0;
        box-sizing: border-box;
    }

    main:has(#delivery-map) #delivery-order-id {
        flex: 1 1 0;
        width: 0;
        min-width: 0;
        min-height: 42px;
        padding: 10px 11px;
        font-size: 14px;
    }

    main:has(#delivery-map) .order-search:has(#delivery-order-id) .reset-filter-button {
        flex: 0 0 auto;
        width: auto;
        min-width: 0;
        margin: 0;
        padding: 10px 12px;
        font-size: 13px;
        white-space: nowrap;
    }
}


/* Restaurant Management */
.restaurant-management {
    margin: 24px 0 36px;
    padding: 22px;
    background: #ffffff;
    border: 1px solid #e2e8e4;
    border-radius: 14px;
}

.restaurant-management h2 {
    margin-top: 0;
}

.restaurant-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
}

.restaurant-toolbar input,
.restaurant-toolbar select {
    flex: 1;
    min-width: 180px;
    padding: 11px;
    border: 1px solid #cbd5ce;
    border-radius: 8px;
}

.restaurant-toolbar button,
.restaurant-actions button {
    padding: 10px 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.restaurant-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 18px;
}

.restaurant-card {
    margin: 14px 0;
    padding: 18px;
    border: 1px solid #dce5df;
    border-radius: 12px;
    background: #f9fcfa;
    overflow-wrap: anywhere;
}

.restaurant-card h3 {
    margin-top: 0;
}

.restaurant-card p {
    margin: 9px 0;
}

.restaurant-status-badge {
    font-weight: 700;
}

.restaurant-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.restaurant-actions button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 600px) {
    .restaurant-management {
        padding: 14px;
    }

    .restaurant-toolbar {
        flex-direction: column;
    }

    .restaurant-toolbar input,
    .restaurant-toolbar select,
    .restaurant-toolbar button {
        box-sizing: border-box;
        width: 100%;
    }
}

/* Food Availability Badge */

.availability-badge {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.badge-available {
    background: #dcfce7;
    color: #15803d;
}

.badge-unavailable {
    background: #fee2e2;
    color: #b91c1c;
}

/* Disabled Order Button */

.food-card button:disabled {
    background: #b8b8b8;
    color: white;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* More Category Dropdown */
.more-category {
    position: relative;
    display: inline-block;
}

#more-category-btn {
    cursor: pointer;
    white-space: nowrap;
}

.more-category-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 190px;
    background: white;
    border-radius: 10px;
    padding: 8px;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

.more-category-menu.show {
    display: flex;
    flex-direction: column;
}

.more-category-menu button {
    width: 100%;
    text-align: left;
    white-space: nowrap;
    border: none;
    background: transparent;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
}

.more-category-menu button:hover {
    background: #f0f7f0;
}

.available-orders-section {
    width: 100%;
    margin: 20px 0;
    padding: 20px;
    background: #fff;
    border: 1px solid #dce9e0;
    border-radius: 16px;
    box-shadow: 0 5px 18px rgba(22, 65, 42, 0.07);
}

#toggle-available-orders {
    display: block;
    width: 100%;
    min-height: 54px;
    padding: 14px 18px;
    text-align: left;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
}

#available-orders-content {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #e7eee9;
}

#available-orders-content h2 {
    margin-top: 0;
}

@media (max-width: 600px) {
    .available-orders-section {
        padding: 15px;
    }

    #toggle-available-orders {
        min-height: 50px;
        padding: 12px 14px;
    }
}

.phone-input-group {
    display: flex;
    align-items: stretch;
    width: 100%;
    margin: 8px 0 14px;
}

.phone-input-group .phone-prefix {
    display: flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-right: 0;
    border-radius: 8px 0 0 8px;
    background: #f5f5f5;
    font-weight: 600;
    white-space: nowrap;
}

.phone-input-group input {
    flex: 1;
    min-width: 0;
    width: 100%;
    margin: 0;
    box-sizing: border-box;
    border-radius: 0 8px 8px 0;
}

.order-card .cancel-order-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-height: 42px;
    margin: 12px 8px 0 0;
    padding: 10px 16px;
    border: 1px solid #b91c1c;
    border-radius: 8px;
    background: #b91c1c;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.order-card .cancel-order-button:hover:not(:disabled) {
    background: #991b1b;
    border-color: #991b1b;
    transform: translateY(-1px);
}

.order-card .cancel-order-button:focus-visible {
    outline: 3px solid rgba(185, 28, 28, 0.3);
    outline-offset: 2px;
}

.order-card .cancel-order-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}