:root {
    /* Royal Rajasthan Theme Colors */
    --primary: #8B0000; /* Deep Red */
    --secondary: #FFD700; /* Gold */
    --bg-color: #f7f5ef; /* Soft Cream Off-White */
    --text-color: #333333;
    --text-light: #666666;
    --accent: #DAA520;
    
    --sidebar-bg: #1c0e0b; /* Dark Burgundy Brown */
    --sidebar-active: #8B0000;
    --card-bg: #ffffff;
    --border-color: rgba(0, 0, 0, 0.08);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Utilities */
.hidden {
    display: none !important;
}

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.text-center { text-align: center; }
.text-light { color: var(--text-light); }
.max-width-md { max-width: 600px; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: inherit;
    font-size: 0.9rem;
}

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

.btn-primary:hover {
    background-color: #630000;
}

.btn-secondary {
    background-color: #e0e0e0;
    color: #333;
}

.btn-secondary:hover {
    background-color: #d0d0d0;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 8px 18px;
}

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

.btn-danger {
    background-color: #dc3545;
    color: #fff;
}

.btn-danger:hover {
    background-color: #bd2130;
}

.btn-logout {
    background-color: rgba(255,255,255,0.08);
    color: #fff;
    width: 100%;
    margin-top: 1rem;
    font-size: 0.85rem;
}

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

/* Google Login Button */
.btn-google {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background-color: #ffffff;
    color: #757575;
    border: 1px solid #dcdcdc;
    border-radius: 4px;
    padding: 12px 24px;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    transition: var(--transition);
    width: 100%;
    margin-top: 1.5rem;
}

.btn-google:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.12);
    background-color: #fafafa;
}

.btn-google svg {
    width: 20px;
    height: 20px;
}

/* Auth Page CSS */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
    background: radial-gradient(circle at 10% 20%, rgba(139,0,0,0.05) 0%, rgba(255,255,255,0) 80%), var(--bg-color);
}

.auth-card {
    background: #ffffff;
    border-radius: var(--border-radius);
    padding: 3rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.06);
    border: 1px solid var(--border-color);
    text-align: center;
}

.auth-logo img {
    height: 60px;
    object-fit: contain;
    margin-bottom: 2rem;
}

.auth-card h2 {
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

.auth-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    text-align: left;
}

.alert-danger {
    background-color: #fce8e6;
    color: #c5221f;
    border: 1px solid #fad2cf;
}

/* Dashboard Layout */
.dashboard-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    background-color: var(--sidebar-bg);
    color: #fff;
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    position: sticky;
    top: 0;
    height: 100vh;
    box-shadow: 4px 0 15px rgba(0,0,0,0.05);
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 3rem;
}

.sidebar-logo {
    height: 32px;
    width: auto;
    object-fit: contain;
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary);
    letter-spacing: 0.5px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.nav-item {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.7);
    padding: 12px 16px;
    border-radius: 8px;
    text-align: left;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
    width: 100%;
}

.nav-item:hover {
    color: #fff;
    background-color: rgba(255,255,255,0.05);
}

.nav-item.active {
    color: #fff;
    background-color: var(--sidebar-active);
    box-shadow: 0 4px 12px rgba(139,0,0,0.3);
}

.sidebar-footer {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 1.5rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--secondary);
}

.user-info {
    flex-grow: 1;
    overflow: hidden;
}

.user-email {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    color: #fff;
}

.user-role {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
}

/* Main Content Area */
.main-content {
    padding: 2.5rem;
    overflow-y: auto;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.content-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

/* Dashboard Cards */
.dashboard-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 1.75rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-icon {
    font-size: 2rem;
    background-color: rgba(139, 0, 0, 0.06);
    color: var(--primary);
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

.stat-info h3 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 2px;
}

/* Grids and Layouts */
.grid-2col {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1.5rem;
}

/* Action Bar */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.search-box {
    flex-grow: 1;
    max-width: 400px;
}

.search-box input {
    width: 100%;
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.08);
}

/* Tables */
.table-container {
    width: 100%;
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.table th, .table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    vertical-align: middle;
}

.table th {
    font-weight: 600;
    color: var(--text-light);
    background-color: rgba(0,0,0,0.01);
}

.table tbody tr:hover {
    background-color: rgba(0,0,0,0.005);
}

.table-dish-img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.table-dish-placeholder {
    width: 44px;
    height: 44px;
    background-color: var(--secondary);
    opacity: 0.7;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.dish-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 6px;
    border-radius: 6px;
    transition: var(--transition);
}

.btn-icon-edit:hover {
    background-color: rgba(218, 165, 32, 0.1);
}

.btn-icon-delete:hover {
    background-color: rgba(220, 53, 69, 0.1);
}

/* Forms */
.form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
}

.form-group input, 
.form-group select, 
.form-group textarea {
    padding: 10px 14px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.08);
}

.form-help {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 2px;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    transition: var(--transition);
}

.modal-content {
    background: #ffffff;
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 550px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    border: 1px solid var(--border-color);
    overflow: hidden;
    animation: modalSlide 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(139, 0, 0, 0.02);
}

.modal-header h3 {
    color: var(--primary);
    font-weight: 700;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    line-height: 1;
}

.modal-close:hover {
    color: var(--primary);
}

.modal-content form {
    padding: 1.75rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #333333;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 3000;
    animation: toastFade 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.toast-success {
    background-color: #2e7d32;
    border-left: 4px solid #4caf50;
}

.toast-error {
    background-color: #c62828;
    border-left: 4px solid #f44336;
}

/* Responsive design */
@media (max-width: 900px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        height: auto;
        position: static;
        padding: 1.25rem;
    }
    
    .sidebar-header {
        margin-bottom: 1.5rem;
    }
    
    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 8px;
    }
    
    .nav-item {
        white-space: nowrap;
        padding: 10px 14px;
        width: auto;
    }
    
    .sidebar-footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
    }
    
    .btn-logout {
        width: auto;
        margin-top: 0;
    }
    
    .main-content {
        padding: 1.5rem;
    }
    
    .grid-2col {
        grid-template-columns: 1fr;
    }
}

/* Order Tab Styles */
.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-new {
    background-color: #e8f0fe;
    color: #1a73e8;
}

.status-completed {
    background-color: #e6f4ea;
    color: #137333;
}

.status-cancelled {
    background-color: #fce8e6;
    color: #c5221f;
}

.order-status-select {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background-color: #fff;
    font-family: inherit;
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
    transition: var(--transition);
}

.order-status-select:focus {
    border-color: var(--primary);
}

.order-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Image Optimization & Progress Styling */
.progress-bar-container {
    background-color: #e5e7eb;
    border-radius: 4px;
    height: 20px;
    overflow: hidden;
    margin-bottom: 15px;
    position: relative;
}

#bulk-progress-bar {
    background-color: #3b82f6;
    width: 0%;
    height: 100%;
    transition: width 0.3s ease;
}

#bulk-log {
    background-color: #1f2937;
    color: #10b981;
    font-family: monospace;
    font-size: 12px;
    padding: 10px;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    text-align: left;
    white-space: pre-wrap;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.15);
}

.table-dish-img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.table-dish-placeholder {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f3f4f6;
    border-radius: 4px;
    font-size: 1.25rem;
}

