:root {
    --bg-color: #121212;
    --surface-color: #1E1E1E;
    --primary-color: #FF5722;
    --primary-hover: #E64A19;
    --secondary-color: #FFC107;
    --text-color: #FFFFFF;
    --text-muted: #B0B0B0;
    --success-color: #4CAF50;
    --error-color: #F44336;
    --border-radius: 8px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    color: var(--text-color);
    font-family: 'Outfit', sans-serif;
    /* Ensuring font consistency */
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

/* Navbar */
.navbar {
    background-color: var(--surface-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
}

.navbar .nav-links {
    display: flex;
    gap: 20px;
}

.menu-toggle {
    display: none;
}

.nav-link:hover {
    color: var(--primary-color);
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Forms */
.auth-form {
    max-width: 400px;
    margin: 4rem auto;
    background: var(--surface-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.form-group input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #333;
    background: #2C2C2C;
    color: white;
    border-radius: var(--border-radius);
}

.form-group input:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* Flash Messages */
.flash-messages {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1000;
}

.alert {
    background: var(--surface-color);
    padding: 1rem;
    margin-bottom: 10px;
    border-left: 4px solid var(--primary-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

/* Menu Grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.food-card {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: transform 0.3s;
}

.food-card:hover {
    transform: translateY(-5px);
}

.food-img {
    height: 200px;
    background-color: #333;
    /* Placeholder color before images */
    background-size: cover;
    background-position: center;
}

.food-info {
    padding: 1.5rem;
}

.food-name {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.food-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    height: 60px;
    /* limit height */
    overflow: hidden;
}

.food-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price {
    font-size: 1.2rem;
    color: var(--secondary-color);
    font-weight: bold;
}

/* Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
}

.orders-list {
    background: var(--surface-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
}

.order-item {
    border-bottom: 1px solid #333;
    padding: 1rem 0;
}

.order-item:last-child {
    border-bottom: none;
}

.status-badge {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    background: #333;
}

.status-Pending {
    color: orange;
}

.status-Preparing {
    color: yellow;
}

.status-Delivered {
    color: lightgreen;
}

/* Hero */
.hero {
    text-align: center;
    padding: 4rem 1rem;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/hero.jpg');
    background-size: cover;
    background-position: center;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    text-shadow: 2px 2px 4px black;
}

/* Floating Cart Button */
.floating-cart-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--primary-color);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 10px rgba(255, 87, 34, 0.4);
    z-index: 1000;
    transition: transform 0.3s, background-color 0.3s;
}

.floating-cart-btn:hover {
    transform: scale(1.1);
    background-color: var(--primary-hover);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 0;
        padding: 1rem;
    }

    .menu-toggle {
        display: block;
        background: transparent;
        border: none;
        font-size: 1.5rem;
        color: var(--primary-color);
        cursor: pointer;
        padding: 0.5rem;
        transition: transform 0.2s;
        position: absolute;
        /* Fix absolute positioning for proper placement */
        right: 20px;
        top: 15px;
    }

    .menu-toggle:active {
        transform: scale(0.95);
    }

    .navbar .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        margin-top: 1rem;
        gap: 10px;
        background-color: var(--surface-color);
        border-radius: var(--border-radius);
        padding: 1rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
    }

    .navbar .nav-links.active {
        display: flex;
    }

    .nav-link {
        width: 100%;
        text-align: left;
        padding: 0.8rem 1rem;
        border-bottom: 1px solid #333;
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .menu-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }

    .container {
        padding: 0 0.5rem;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    /* Mobile Cart Adjustments */
    .cart-container {
        padding: 1rem !important;
    }

    .cart-summary {
        margin-left: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    h1 {
        font-size: 1.8rem;
    }
}

/* Admin Tabs */
.tab-btn {
    background: transparent;
    color: #aaa;
    border: none;
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: 0.2s;
    white-space: nowrap;
}

.tab-btn:hover {
    color: white;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Chat Widget Styles */
.chat-toggle-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    /* Moved to Left */
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--secondary-color);
    color: var(--background-color);
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
    transition: transform 0.2s;
}

.chat-toggle-btn:hover {
    transform: scale(1.1);
}

.chat-widget {
    position: fixed;
    bottom: 100px;
    left: 30px;
    /* Moved to Left */
    width: 350px;
    height: 450px;
    background: #222;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    z-index: 1002;
    border: 1px solid #444;
    overflow: hidden;
}

.chat-header {
    padding: 15px;
    background: var(--secondary-color);
    color: var(--background-color);
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.message.sent {
    align-self: flex-end;
    background: var(--secondary-color);
    color: var(--background-color);
    border-bottom-right-radius: 2px;
}

.message.received {
    align-self: flex-start;
    background: #333;
    color: white;
    border-bottom-left-radius: 2px;
}

.chat-input-area {
    padding: 15px;
    background: #1a1a1a;
    border-top: 1px solid #333;
    display: flex;
    gap: 10px;
}

#chat-input {
    flex: 1;
    padding: 10px;
    border-radius: 20px;
    border: 1px solid #444;
    background: #333;
    color: white;
    outline: none;
}

.chat-input-area button {
    background: var(--secondary-color);
    color: var(--background-color);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
}

/* Mobile Responsiveness for Chat */
@media (max-width: 480px) {
    .chat-widget {
        width: 90%;
        left: 5%;
        /* Adjusted for Left positioning */
        bottom: 100px;
        height: 60vh;
    }
}