:root {
    --primary: #ff6b6b;
    /* Warm Coral */
    --primary-dark: #ee5253;
    --secondary: #feca57;
    /* Warm Yellow */
    --bg: #fffbf0;
    /* Soft Cream */
    --card: #ffffff;
    --text: #2d3436;
    --text-light: #636e72;
    --border: #ffeaa7;
    --radius: 20px;
    --shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-tap-highlight-color: transparent;
    background-image: radial-gradient(#ffeaa7 1px, transparent 1px);
    background-size: 20px 20px;
}

.view {
    min-height: 100vh;
    padding-bottom: 90px;
    box-sizing: border-box;
}

.hidden {
    display: none !important;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes popIn {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Auth View */
.auth-box {
    padding: 40px 25px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(135deg, #fff 0%, #fffbf0 100%);
}

.hero-img {
    width: 220px;
    height: 220px;
    object-fit: contain;
    margin-bottom: 20px;
    animation: popIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.auth-box h1 {
    color: var(--primary);
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 1px;
}

.tabs {
    background: #fff;
    padding: 6px;
    border-radius: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    display: flex;
    gap: 5px;
}

.tab {
    padding: 10px 40px;
    border: none;
    background: transparent;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-light);
    transition: all 0.3s;
    cursor: pointer;
}

.tab.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.3);
}

form {
    width: 100%;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    animation: fadeIn 0.5s ease;
}

input {
    padding: 16px;
    border: 2px solid transparent;
    background: #fff;
    border-radius: 15px;
    font-size: 16px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    transform: translateY(-2px);
}

.role-select {
    background: #fff;
    padding: 15px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.primary-btn {
    background: var(--primary);
    color: #fff;
    padding: 16px;
    border: none;
    border-radius: 30px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 20px;
    box-shadow: 0 10px 20px rgba(255, 107, 107, 0.3);
    transition: transform 0.2s;
    cursor: pointer;
}

.primary-btn:active {
    transform: scale(0.95);
}

/* Header */
.nav-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.03);
}

.nav-header span {
    font-weight: 700;
    font-size: 18px;
    color: var(--text);
}

.chef-header span::before {
    content: '👨‍🍳';
    margin-right: 8px;
}

.sm-btn {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    background: #f1f2f6;
    color: var(--text-light);
    border-radius: 20px;
}

/* Tabs */
.customer-tabs {
    background: #fff;
    display: flex;
    justify-content: space-around;
    padding: 15px 0;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.02);
}

.c-tab {
    border: none;
    background: transparent;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-light);
    position: relative;
    padding-bottom: 5px;
}

.c-tab.active {
    color: var(--primary);
    font-weight: 800;
}

.c-tab.active::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 4px;
    background: var(--primary);
    border-radius: 10px 10px 0 0;
}

/* Menu */
.section {
    padding: 0 20px;
}

.cat-list {
    overflow-x: auto;
    white-space: nowrap;
    margin-bottom: 25px;
    padding: 5px;
}

.cat-list button {
    border: none;
    background: #fff;
    padding: 10px 20px;
    margin-right: 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.cat-list button.active-cat {
    background: var(--secondary);
    color: #fff;
    transform: translateY(-2px);
}

.dish-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    animation: fadeIn 0.4s ease;
}

.dish-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 15px;
    display: flex;
    gap: 15px;
    align-items: center;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.dish-card:active {
    transform: scale(0.98);
}

.dish-card img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.dish-card .info {
    flex: 1;
    height: 90px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.dish-card h4 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
}

.dish-card button {
    align-self: flex-end;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: none;
    background: var(--primary);
    color: #fff;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.4);
}

/* Cart & Orders */
.cart-item,
.order-card {
    background: #fff;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    animation: fadeIn 0.4s ease;
}

.cart-footer {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 200;
}

.checkout-btn {
    background: var(--text);
    color: #fff;
    border: none;
    padding: 14px 35px;
    border-radius: 20px;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.status-badge {
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending .status-badge {
    background: #ffeaa7;
    color: #d35400;
}

.status-cooking .status-badge {
    background: #55efc4;
    color: #00b894;
}

/* Chef Specific */
.warning-box {
    margin-top: 15px;
    background: #ff7675;
    color: #fff;
    padding: 10px;
    border-radius: 10px;
    font-weight: 600;
}

.add-pantry-row input {
    background: #f1f2f6;
    border: none;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 20px;
    width: 85%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal h3 {
    margin-top: 0;
    color: var(--primary);
    text-align: center;
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.preview-img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    margin-top: 10px;
}

.upload-btn {
    display: block;
    text-align: center;
    background: #f1f2f6;
    padding: 10px;
    border-radius: 10px;
    color: var(--text-light);
    cursor: pointer;
    border: 2px dashed #ddd;
}

/* Chef Menu Card Actions */
.menu-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.action-btn {
    flex: 1;
    border: none;
    padding: 6px 0;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

/* Enhanced Form Styles */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 14px;
    color: #444;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 14px;
}

.form-group.row {
    display: flex;
    gap: 10px;
}

.half {
    flex: 1;
}

.dashed-btn {
    width: 100%;
    border: 2px dashed #ddd;
    background: none;
    color: #666;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
}

.dashed-btn:hover {
    border-color: #aaa;
    color: #333;
}

/* Ingredient Row */
.ing-row {
    display: flex;
    gap: 5px;
    align-items: center;
    margin-bottom: 8px;
    position: relative;
}

.ing-name-wrap {
    position: relative;
    flex: 2;
}

.ing-qty {
    width: 60px !important;
    text-align: center;
}

.ing-unit {
    width: 40px !important;
    background: #f9f9f9;
    border: none !important;
    color: #666;
    text-align: center;
}

.autocomplete-box {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #eee;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
    max-height: 150px;
    overflow-y: auto;
}

.autocomplete-item {
    padding: 8px;
    font-size: 13px;
    border-bottom: 1px solid #f9f9f9;
    cursor: pointer;
}

.autocomplete-item:hover {
    background: #f0f8ff;
}

.action-btn:active {
    transform: scale(0.95);
}

.btn-edit {
    background: #fcf1dd;
    color: #e67e22;
}

.btn-delete {
    background: #ffe3e3;
    color: #ff4757;
}

/* Review Stars */
.stars {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 15px 0;
}

.star {
    font-size: 32px;
    color: #ddd;
    cursor: pointer;
    transition: transform 0.2s;
}

.star:active {
    transform: scale(1.2);
}