:root {
    --primary-color: #E23744;
    --primary-hover: #CB202D;
    --secondary-color: #1C1C1C;
    --bg-color: #F8F9FA;
    --surface-color: rgba(255, 255, 255, 0.7);
    --glass-bg: rgba(255, 255, 255, 0.4);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-blur: blur(12px);
    --text-main: #1C1C1C;
    --text-muted: #4A4A4A;
    --border-color: rgba(0, 0, 0, 0.05);
    --success-color: #24963F;
    --warning-color: #F5A623;
    
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 28px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 4px 12px rgba(0,0,0,0.03);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.06);
    --shadow-lg: 0 16px 40px rgba(226, 55, 68, 0.12);
    
    --font-family: 'Outfit', sans-serif;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    font-family: var(--font-family);
    background: 
        radial-gradient(at 0% 0%, rgba(226, 55, 68, 0.05) 0%, transparent 50%),
        radial-gradient(at 100% 0%, rgba(245, 166, 35, 0.05) 0%, transparent 50%),
        radial-gradient(at 100% 100%, rgba(36, 150, 63, 0.05) 0%, transparent 50%),
        radial-gradient(at 0% 100%, rgba(226, 55, 68, 0.05) 0%, transparent 50%),
        #FDFDFD;
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--secondary-color);
}

h1 { font-size: 2rem; margin-bottom: 0.5rem; }
h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }
p { color: var(--text-muted); }

/* Layout & Containers */
#app-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.view {
    width: 100%;
    height: 100%;
    flex: 1;
    overflow-y: auto;
    position: relative;
    animation: fadeIn 0.4s ease forwards;
}

.hidden {
    display: none !important;
}

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

/* Splash Screen / Portal Select */
.portal-splash {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    text-align: center;
    background: 
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 1) 0%, rgba(255, 240, 241, 1) 100%);
}

.splash-logo h1 {
    font-size: 3rem;
    color: var(--primary-color);
    font-weight: 800;
    letter-spacing: -1px;
}

.splash-logo p {
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.portal-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 320px;
}

/* Buttons */
button {
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 1rem;
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

button:active {
    transform: scale(0.97);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 16px 32px rgba(226, 55, 68, 0.25);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    color: var(--secondary-color);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background-color: white;
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Forms & Inputs */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.input-group label {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.input-group input, .input-group select {
    font-family: var(--font-family);
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    background-color: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    transition: var(--transition);
}

.input-group input:focus, .input-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: white;
    box-shadow: 0 8px 24px rgba(226, 55, 68, 0.1);
}

/* Cards */
.card {
    background-color: var(--surface-color);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(226, 55, 68, 0.15);
}

/* Zomato Style Card Overhaul */
.zomato-menu-card {
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.zomato-menu-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12) !important;
}

.zomato-menu-card:hover .card-image {
    transform: scale(1.06);
}

/* Mock Phone UI for Customer & Delivery Panels */
.mobile-layout {
    max-width: 480px;
    margin: 0 auto;
    background: var(--bg-color);
    min-height: 100vh;
    box-shadow: var(--shadow-lg);
    position: relative;
    padding-bottom: 80px; /* Space for bottom nav */
}

/* Desktop UI for Admin */
.desktop-layout {
    display: flex;
    min-height: 100vh;
    background: var(--bg-color);
}

.sidebar {
    width: 260px;
    background-color: var(--surface-color);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

.main-content {
    flex: 1;
    padding: 2rem;
    height: 100vh;
    overflow-y: auto;
}

/* Header */
.app-header {
    background-color: var(--surface-color);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid var(--glass-border);
}

/* Bottom Navigation (Mobile) */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background-color: var(--surface-color);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-around;
    padding: 0.75rem 0 1.5rem 0; /* Extra padding for modern phones */
    z-index: 100;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.05);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.nav-item i {
    font-size: 1.25rem;
}

.nav-item.active {
    color: var(--primary-color);
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: var(--surface-color);
    width: 90%;
    max-width: 400px;
    border-radius: var(--radius-lg);
    padding: 2rem;
    position: relative;
    box-shadow: 0 24px 48px rgba(0,0,0,0.2);
    animation: zoomIn 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

/* Toasts */
#toast-container {
    position: fixed;
    bottom: 90px; /* Above bottom nav */
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.toast {
    background-color: var(--secondary-color);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    animation: slideUpFade 0.3s ease forwards;
}

@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Utility tags */
.tag {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.tag-veg {
    background-color: rgba(36, 150, 63, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(36, 150, 63, 0.3);
}

.tag-nonveg {
    background-color: rgba(226, 55, 68, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(226, 55, 68, 0.3);
}

/* Veg/Nonveg Icons */
.diet-icon {
    width: 16px;
    height: 16px;
    border: 1px solid currentColor;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
}
.diet-icon::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: currentColor;
}
.diet-icon.veg {
    color: var(--success-color);
}
.diet-icon.nonveg {
    color: var(--primary-color);
}

/* Glassmorphism Payment Loading Overlay */
.payment-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(28, 28, 28, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: var(--font-family);
    animation: fadeIn 0.3s ease;
}

.payment-loader-box {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    max-width: 360px;
    width: 90%;
    text-align: center;
    box-shadow: 0 24px 48px rgba(0,0,0,0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: zoomIn 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

.payment-spinner {
    width: 64px;
    height: 64px;
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    margin: 0 auto 2rem auto;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

