:root {
    --primary-color: #f97316;
    /* Vibrant Orange */
    --primary-hover: #ea580c;
    --bg-color: #0f172a;
    /* Dark Slate */
    --bg-card: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);
    --success: #22c55e;
    --shadow-glass: 0 4px 30px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    background-image:
        radial-gradient(at 0% 0%, hsla(28, 100%, 74%, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, hsla(210, 100%, 56%, 0.1) 0px, transparent 50%);
    background-attachment: fixed;
    min-height: 100vh;
}

h1,
h2,
h3,
h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

/* ==================================
   Top Navigation (Role Selector)
   ================================== */
.role-selector {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.role-tabs {
    display: flex;
    gap: 1rem;
}

.role-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.role-btn:hover {
    color: var(--text-main);
    border-color: var(--text-muted);
}

.role-btn.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* ==================================
   Main Container
   ================================== */
.app-container {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.app-view {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.app-view.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.view-header {
    margin-bottom: 2rem;
}

.view-header h2 {
    font-size: 2rem;
}

.view-header p {
    color: var(--text-muted);
}

/* ==================================
   Glassmorphism Cards
   ================================== */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-glass);
}

.mt-2 {
    margin-top: 1.5rem;
}

/* ==================================
   Buttons
   ================================== */
.btn-primary,
.btn-secondary {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-primary:disabled {
    background: #475569;
    color: #94a3b8;
    cursor: not-allowed;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-secondary:hover {
    background: rgba(249, 115, 22, 0.1);
}

/* ==================================
   Customer Grid
   ================================== */
.customer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.menu-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.menu-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.menu-img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.menu-info {
    padding: 1rem;
}

.menu-category {
    font-size: 0.75rem;
    color: var(--primary-color);
    text-transform: uppercase;
    font-weight: 700;
}

.menu-title {
    font-size: 1.1rem;
    margin: 0.3rem 0;
}

.menu-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.menu-price {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
}

/* Skeletons */
.skeleton-card {
    height: 250px;
    background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 12px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ==================================
   Cart Section
   ================================== */
.cart-items {
    min-height: 100px;
    margin: 1rem 0;
    max-height: 300px;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-color);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.summary-row.total {
    color: var(--text-main);
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 0.5rem;
    margin-bottom: 1.2rem;
}

hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 1rem 0;
}

/* ==================================
   Live Tracking
   ================================== */
.hidden {
    display: none !important;
}

.status-timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
    border-left: 2px solid var(--border-color);
    padding-left: 1rem;
}

.timeline-item {
    position: relative;
    color: var(--text-muted);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.4rem;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-color);
}

.timeline-item.active {
    color: var(--primary-color);
    font-weight: 700;
}

.timeline-item.active::before {
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
}

/* ==================================
   Resto Grid & Order List
   ================================== */
.resto-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.order-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.badge {
    background: rgba(249, 115, 22, 0.2);
    color: var(--primary-color);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge.success {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success);
}

/* Form inputs */
input,
select,
textarea {
    width: 100%;
    padding: 0.8rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border-color);
    color: #fff;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-family: 'Inter', sans-serif;
}

.rating-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.rating-group input {
    margin-bottom: 0;
    width: 60px;
}

/* Responsive */
@media (max-width: 768px) {

    .customer-grid,
    .resto-grid {
        grid-template-columns: 1fr;
    }
}