/* ============================================
   SYLVA'S TREAT AND POTS — COMPLETE STYLES
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,600;0,700;1,400;1,600&family=DM+Sans:wght@300;400;500;600;700&display=swap');

:root {
    --primary:    #C17B8A;
    --primary-dk: #9E5A6A;
    --primary-lt: #F5E6EA;
    --secondary:  #FDF5F6;
    --accent:     #D4956A;
    --gold:       #C8965A;
    --dark:       #2C1A20;
    --mid:        #7A6068;
    --light:      #FBF7F8;
    --white:      #FFFFFF;
    --border:     #EDD8DC;
    --success:    #4A9E72;
    --warning:    #C8965A;
    --danger:     #C0504A;
    --radius:     16px;
    --shadow:     0 4px 24px rgba(193,123,138,0.10);
    --shadow-lg:  0 8px 40px rgba(193,123,138,0.18);
    --font-head:  'Cormorant Garamond', serif;
    --font-body:  'DM Sans', sans-serif;
    --transition: 0.25s ease;
    --nav-h:      72px;
}

/* RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--light); color: var(--dark); font-size: 15px; line-height: 1.6; }
a { text-decoration: none; color: inherit; cursor: pointer; }
button { cursor: pointer; border: none; outline: none; font-family: inherit; }
img { max-width: 100%; }
input, textarea, select { font-family: inherit; }

/* ============================================ UTILITY ============================================ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }
.text-center { text-align: center; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }

/* ============================================ LOADING ============================================ */
.loading-overlay {
    position: fixed; inset: 0; background: rgba(255,255,255,0.85);
    display: none; align-items: center; justify-content: center; z-index: 9999;
    backdrop-filter: blur(4px);
}
.loading-overlay.active { display: flex; }
.spinner {
    width: 42px; height: 42px;
    border: 3px solid var(--primary-lt);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================ TOAST ============================================ */
#toastContainer { position: fixed; bottom: 24px; right: 24px; z-index: 9000; display: flex; flex-direction: column; gap: 10px; }
.toast {
    background: var(--dark); color: #fff; padding: 12px 20px; border-radius: 12px;
    font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 10px;
    animation: toastIn 0.3s ease; min-width: 220px; max-width: 340px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.toast.success { background: var(--success); }
.toast.error   { background: var(--danger); }
.toast.warning { background: var(--warning); }
@keyframes toastIn  { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
@keyframes toastOut { from { opacity:1; transform:translateY(0); } to { opacity:0; transform:translateY(20px); } }

/* ============================================ NAVBAR ============================================ */
.navbar {
    position: sticky; top: 0; z-index: 100;
    background: var(--white); height: var(--nav-h);
    border-bottom: 2px solid var(--primary-lt);
    box-shadow: 0 2px 20px rgba(233,30,140,0.08);
}
.navbar .container { display: flex; align-items: center; height: 100%; gap: 16px; }
.nav-logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nav-logo-img { height: 52px; width: 52px; object-fit: cover; border-radius: 50%; border: 2px solid var(--primary-lt); box-shadow: 0 2px 12px rgba(193,123,138,0.18); }
.nav-logo-text { font-family: var(--font-head); font-size: 20px; font-weight: 800; color: var(--primary); }
.nav-logo-text span { color: var(--dark); }
.nav-search { flex: 1; max-width: 440px; position: relative; }
.nav-search input {
    width: 100%; padding: 10px 16px 10px 42px;
    border: 2px solid var(--border); border-radius: 100px;
    background: var(--light); font-size: 14px;
    transition: border-color var(--transition);
}
.nav-search input:focus { outline: none; border-color: var(--primary); background: var(--white); }
.nav-search .search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 16px; }
.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.btn-ghost {
    background: none; border: 2px solid var(--border); padding: 8px 16px;
    border-radius: 100px; font-size: 14px; font-weight: 600;
    transition: all var(--transition); color: var(--dark);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dk));
    color: var(--white); padding: 10px 22px; border-radius: 100px;
    font-size: 14px; font-weight: 700;
    transition: all var(--transition); box-shadow: 0 4px 16px rgba(233,30,140,0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(233,30,140,0.4); }
.btn-primary:active { transform: translateY(0); }
.btn-cart {
    position: relative; background: var(--primary-lt); color: var(--primary);
    padding: 9px 18px; border-radius: 100px; font-size: 14px; font-weight: 700;
    display: flex; align-items: center; gap: 6px; transition: all var(--transition);
}
.btn-cart:hover { background: var(--primary); color: var(--white); }
.cart-badge {
    background: var(--primary); color: var(--white); font-size: 11px; font-weight: 800;
    min-width: 18px; height: 18px; border-radius: 50%; display: flex;
    align-items: center; justify-content: center; padding: 0 4px;
}
.btn-cart:hover .cart-badge { background: var(--white); color: var(--primary); }
.user-btn {
    display: flex; align-items: center; gap: 8px; background: none;
    border: 2px solid var(--border); padding: 6px 14px; border-radius: 100px;
    font-size: 14px; font-weight: 600; transition: all var(--transition); color: var(--dark);
}
.user-btn:hover { border-color: var(--primary); color: var(--primary); }
.user-avatar {
    width: 28px; height: 28px; background: var(--primary); color: var(--white);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 13px;
}
.dropdown-menu {
    position: absolute; top: calc(100% + 8px); right: 0; background: var(--white);
    border: 1.5px solid var(--border); border-radius: 14px; min-width: 200px;
    box-shadow: var(--shadow-lg); overflow: hidden; opacity: 0; pointer-events: none;
    transform: translateY(-8px); transition: all var(--transition);
}
.dropdown-menu.open { opacity: 1; pointer-events: all; transform: translateY(0); }
.dropdown-menu a, .dropdown-menu button {
    display: block; width: 100%; padding: 12px 18px; font-size: 14px; font-weight: 600;
    color: var(--dark); transition: background var(--transition); text-align: left;
    background: none;
}
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--secondary); color: var(--primary); }
.divider { border-top: 1px solid var(--border); margin: 4px 0; }

/* ============================================ PAGES ============================================ */
.page { display: none; min-height: calc(100vh - var(--nav-h) - 60px); }
.page.active { display: block; }
#adminPage.active { display: flex; min-height: calc(100vh - var(--nav-h)); }

/* ============================================ HERO ============================================ */
.hero {
    background: linear-gradient(135deg, #2C1A20 0%, #3D2028 40%, #2A1520 100%);
    position: relative; overflow: hidden; padding: 60px 0;
}
.hero::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(ellipse at 70% 50%, rgba(193,123,138,0.20) 0%, transparent 60%),
                radial-gradient(ellipse at 20% 80%, rgba(212,149,106,0.12) 0%, transparent 50%);
}
.hero-overlay { position: absolute; inset: 0; }
.hero-container { position: relative; z-index: 1; }
.hero-content { max-width: 680px; }
.hero-logo-wrap { margin-bottom: 24px; }
.hero-logo {
    width: 120px; height: 120px; object-fit: cover;
    border-radius: 50%; border: 3px solid rgba(255,255,255,0.25);
    box-shadow: 0 0 0 8px rgba(193,123,138,0.15), 0 0 40px rgba(193,123,138,0.30);
}
.hero-content h1 {
    font-family: var(--font-head); font-size: clamp(32px, 5vw, 52px);
    font-weight: 900; color: var(--white); line-height: 1.15; margin-bottom: 16px;
}
.hero-content p { font-size: 17px; color: rgba(255,255,255,0.75); margin-bottom: 32px; max-width: 500px; }
.hero-stats { display: flex; gap: 28px; flex-wrap: wrap; }
.hero-stat { text-align: center; }
.hero-stat .num { font-size: 28px; margin-bottom: 4px; }
.hero-stat .lbl { font-size: 12px; color: rgba(255,255,255,0.6); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }

/* ============================================ CATEGORIES ============================================ */
.categories-section { padding: 40px 0 20px; }
.categories-section h2 { font-family: var(--font-head); font-size: 26px; font-weight: 800; margin-bottom: 20px; }
.category-pills { display: flex; gap: 10px; flex-wrap: wrap; }
.pill {
    display: flex; align-items: center; gap: 8px; padding: 10px 20px;
    border-radius: 100px; border: 2px solid var(--border); background: var(--white);
    font-size: 14px; font-weight: 700; cursor: pointer; transition: all var(--transition);
    color: var(--dark);
}
.pill:hover, .pill.active { background: var(--primary); color: var(--white); border-color: var(--primary); }
.pill .emoji { font-size: 18px; }

/* ============================================ RESTAURANTS GRID ============================================ */
.restaurants-section { padding: 24px 0 60px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.section-header h2 { font-family: var(--font-head); font-size: 26px; font-weight: 800; }
.restaurants-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.restaurant-card {
    background: var(--white); border-radius: var(--radius); overflow: hidden;
    border: 1.5px solid var(--border); transition: all var(--transition); cursor: pointer;
    box-shadow: var(--shadow);
}
.restaurant-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary); }
.restaurant-img {
    height: 180px; background: linear-gradient(135deg, var(--primary-lt), var(--secondary));
    display: flex; align-items: center; justify-content: center;
    font-size: 72px; position: relative; overflow: hidden;
}
.restaurant-img img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.restaurant-img .img-emoji { position: relative; z-index: 1; font-size: 72px; }
.restaurant-body { padding: 18px; }
.restaurant-body h3 { font-family: var(--font-head); font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.restaurant-body .desc { font-size: 13px; color: var(--mid); margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.restaurant-meta { display: flex; gap: 10px; flex-wrap: wrap; }
.meta-item { font-size: 12px; color: var(--mid); font-weight: 600; }
.star { color: var(--gold); }

/* ============================================ RESTAURANT PAGE ============================================ */
.restaurant-header {
    background: linear-gradient(135deg, #2C1A20, #9E5A6A);
    padding: 40px 0; color: var(--white);
}
.restaurant-header-inner { display: flex; gap: 24px; align-items: flex-start; margin-top: 16px; }
.restaurant-header-emoji { font-size: 72px; flex-shrink: 0; }
.restaurant-header-img {
    width: 100px; height: 100px; border-radius: 16px; object-fit: cover;
    border: 3px solid rgba(255,255,255,0.4); flex-shrink: 0;
}
.restaurant-header-info h1 { font-family: var(--font-head); font-size: 32px; font-weight: 900; margin-bottom: 8px; }
.restaurant-header-info p { opacity: 0.85; font-size: 15px; margin-bottom: 14px; }
.restaurant-header-meta { display: flex; gap: 16px; flex-wrap: wrap; }
.header-meta-item {
    background: rgba(255,255,255,0.2); padding: 6px 14px;
    border-radius: 100px; font-size: 13px; font-weight: 700;
}
.back-btn {
    background: rgba(255,255,255,0.2); color: var(--white);
    border: none; padding: 8px 18px; border-radius: 100px; font-size: 14px;
    font-weight: 600; cursor: pointer; margin-bottom: 16px;
    transition: background var(--transition);
}
.back-btn:hover { background: rgba(255,255,255,0.35); }

/* ============================================ MENU LAYOUT ============================================ */
.menu-layout { display: grid; grid-template-columns: 1fr 340px; gap: 32px; padding: 32px 0; }
.menu-column { }
.menu-category { margin-bottom: 36px; }
.menu-category h3 { font-family: var(--font-head); font-size: 20px; font-weight: 800; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }

.menu-item-card {
    display: flex; gap: 16px; background: var(--white);
    border: 1.5px solid var(--border); border-radius: var(--radius);
    padding: 16px; margin-bottom: 12px; transition: all var(--transition);
    align-items: center;
}
.menu-item-card:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.menu-item-img {
    width: 80px; height: 80px; border-radius: 12px; object-fit: cover;
    background: var(--primary-lt); flex-shrink: 0; display: flex;
    align-items: center; justify-content: center; font-size: 36px;
}
.menu-item-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.menu-item-info { flex: 1; }
.menu-item-info h4 { font-family: var(--font-head); font-size: 16px; font-weight: 800; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.popular-tag { background: var(--primary-lt); color: var(--primary); font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 100px; font-family: var(--font-body); }
.menu-item-info p { font-size: 13px; color: var(--mid); margin-bottom: 10px; }
.menu-item-foot { display: flex; align-items: center; justify-content: space-between; }
.menu-item-price { font-size: 17px; font-weight: 800; color: var(--primary); }
.add-btn {
    width: 36px; height: 36px; border-radius: 50%; background: var(--primary);
    color: var(--white); font-size: 22px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    transition: all var(--transition); box-shadow: 0 4px 12px rgba(233,30,140,0.3);
    line-height: 1;
}
.add-btn:hover { background: var(--primary-dk); transform: scale(1.1); }

/* ============================================ CART SIDEBAR ============================================ */
.cart-sidebar {
    background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius);
    padding: 20px; position: sticky; top: calc(var(--nav-h) + 16px);
    max-height: calc(100vh - var(--nav-h) - 48px); overflow-y: auto;
    box-shadow: var(--shadow);
}
.cart-sidebar h3 { font-family: var(--font-head); font-size: 18px; font-weight: 800; margin-bottom: 16px; }
.empty-cart { text-align: center; padding: 32px 0; color: var(--mid); }
.empty-cart .icon { font-size: 42px; margin-bottom: 10px; }
.cart-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.cart-item-name { flex: 1; font-size: 13px; font-weight: 600; }
.cart-item-qty { display: flex; align-items: center; gap: 6px; }
.qty-btn { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--border); background: none; font-size: 16px; display: flex; align-items: center; justify-content: center; transition: all var(--transition); }
.qty-btn:hover { border-color: var(--primary); color: var(--primary); }
.qty-num { font-size: 14px; font-weight: 700; min-width: 20px; text-align: center; }
.cart-item-price { font-size: 13px; font-weight: 700; color: var(--primary); }
.cart-summary { margin-top: 16px; border-top: 2px solid var(--border); padding-top: 14px; }
.cart-row { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; }
.cart-row.total { font-weight: 800; font-size: 16px; border-top: 1.5px solid var(--border); padding-top: 10px; margin-top: 6px; color: var(--primary); }
.btn-checkout {
    width: 100%; padding: 14px; border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dk));
    color: var(--white); font-size: 16px; font-weight: 800;
    margin-top: 14px; transition: all var(--transition);
    box-shadow: 0 4px 16px rgba(233,30,140,0.35);
}
.btn-checkout:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(233,30,140,0.45); }
.floating-cart {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary), var(--primary-dk));
    color: var(--white); padding: 14px 28px; border-radius: 100px;
    font-size: 15px; font-weight: 800; z-index: 500;
    box-shadow: 0 6px 28px rgba(233,30,140,0.4); white-space: nowrap;
    animation: bounceIn 0.3s ease;
}
@keyframes bounceIn { from { transform:translateX(-50%) scale(0.8); opacity:0; } to { transform:translateX(-50%) scale(1); opacity:1; } }

/* ============================================ CHECKOUT ============================================ */
.checkout-layout { display: grid; grid-template-columns: 1fr 380px; gap: 32px; padding: 24px 0 60px; }
.checkout-card { background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; box-shadow: var(--shadow); }
.checkout-card h3 { font-family: var(--font-head); font-size: 18px; font-weight: 800; margin-bottom: 18px; }
.payment-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.payment-option {
    border: 2px solid var(--border); border-radius: 12px; padding: 14px;
    text-align: center; cursor: pointer; transition: all var(--transition);
}
.payment-option:hover { border-color: var(--primary); background: var(--secondary); }
.payment-option.selected { border-color: var(--primary); background: var(--primary-lt); }
.pay-icon { font-size: 26px; margin-bottom: 6px; }
.pay-label { font-size: 12px; font-weight: 700; color: var(--dark); }
.payment-info {
    margin-top: 14px; padding: 14px; background: var(--secondary);
    border-radius: 10px; font-size: 14px; line-height: 1.7;
}
.payment-info p { margin-bottom: 4px; }
.order-summary-sticky {
    background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius);
    padding: 24px; position: sticky; top: calc(var(--nav-h) + 16px);
    box-shadow: var(--shadow);
}
.order-summary-item { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 8px; }

/* ============================================ ORDERS PAGE ============================================ */
.orders-page { padding: 32px 0 60px; }
.order-card {
    background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius);
    padding: 20px; margin-bottom: 16px; cursor: pointer; transition: all var(--transition);
    box-shadow: var(--shadow);
}
.order-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.order-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.order-card-head h3 { font-family: var(--font-head); font-size: 17px; font-weight: 800; }
.order-card-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--mid); font-weight: 600; }

.status-badge { padding: 4px 12px; border-radius: 100px; font-size: 12px; font-weight: 700; }
.status-pending       { background: #FEF3C7; color: #D97706; }
.status-confirmed     { background: #D1FAE5; color: #059669; }
.status-preparing     { background: #DBEAFE; color: #2563EB; }
.status-out_for_delivery { background: #EDE9FE; color: #7C3AED; }
.status-delivered     { background: #D1FAE5; color: #059669; }
.status-cancelled     { background: #FEE2E2; color: #DC2626; }

/* ============================================ PROFILE ============================================ */
.profile-page { padding: 32px 0 60px; }
.profile-layout { display: grid; grid-template-columns: 280px 1fr; gap: 28px; }
.profile-sidebar { background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 32px 24px; text-align: center; height: fit-content; box-shadow: var(--shadow); }
.profile-avatar-lg {
    width: 80px; height: 80px; background: linear-gradient(135deg, var(--primary), var(--primary-dk));
    color: var(--white); border-radius: 50%; font-size: 32px; font-weight: 800;
    display: flex; align-items: center; justify-content: center; margin: 0 auto 16px;
}
.profile-sidebar h3 { font-family: var(--font-head); font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.profile-sidebar .email { font-size: 13px; color: var(--mid); margin-bottom: 24px; }
.profile-nav { text-align: left; }
.profile-nav-item { padding: 12px 16px; border-radius: 10px; font-weight: 600; font-size: 14px; cursor: pointer; transition: all var(--transition); margin-bottom: 4px; }
.profile-nav-item:hover, .profile-nav-item.active { background: var(--secondary); color: var(--primary); }
.profile-content-card { background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.profile-content-card h3 { font-family: var(--font-head); font-size: 20px; font-weight: 800; margin-bottom: 24px; }

/* ============================================ FORMS ============================================ */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 700; color: var(--mid); margin-bottom: 6px; }
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%; padding: 11px 14px; border: 2px solid var(--border); border-radius: 10px;
    font-size: 14px; background: var(--light); transition: border-color var(--transition);
    color: var(--dark);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { outline: none; border-color: var(--primary); background: var(--white); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ============================================ MODALS ============================================ */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(26,26,46,0.6);
    display: none; align-items: center; justify-content: center; z-index: 1000;
    padding: 20px; backdrop-filter: blur(4px);
}
.modal-overlay.open { display: flex; }
.modal {
    background: var(--white); border-radius: 20px; padding: 32px;
    width: 100%; max-width: 500px; position: relative;
    animation: modalIn 0.3s ease; max-height: 90vh; overflow-y: auto;
}
.modal-lg { max-width: 640px; }
@keyframes modalIn { from { opacity:0; transform:scale(0.92) translateY(-10px); } to { opacity:1; transform:scale(1) translateY(0); } }
.modal-close {
    position: absolute; top: 16px; right: 16px; background: var(--light);
    border: none; width: 32px; height: 32px; border-radius: 50%; font-size: 16px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background var(--transition);
}
.modal-close:hover { background: var(--border); }
.modal h2 { font-family: var(--font-head); font-size: 24px; font-weight: 800; margin-bottom: 6px; }
.modal .subtitle { font-size: 14px; color: var(--mid); margin-bottom: 24px; }
.auth-switch { text-align: center; margin-top: 16px; font-size: 14px; color: var(--mid); }
.auth-switch a { color: var(--primary); font-weight: 700; cursor: pointer; }

/* ============================================ SEARCH RESULTS ============================================ */
#searchResults {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    background: var(--white); border: 1.5px solid var(--border); border-radius: 14px;
    box-shadow: var(--shadow-lg); z-index: 200; max-height: 360px; overflow-y: auto;
}
.search-section { padding: 8px 0; }
.search-section-title { padding: 8px 16px; font-size: 11px; font-weight: 800; text-transform: uppercase; color: var(--mid); letter-spacing: 1px; }
.search-item { display: flex; align-items: center; gap: 12px; padding: 10px 16px; cursor: pointer; transition: background var(--transition); }
.search-item:hover { background: var(--secondary); }
.search-item .icon { font-size: 22px; }
.search-item .info .name { font-size: 14px; font-weight: 700; }
.search-item .info .sub { font-size: 12px; color: var(--mid); }

/* ============================================ EMPTY STATE ============================================ */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state .emoji { font-size: 56px; margin-bottom: 16px; }
.empty-state h3 { font-family: var(--font-head); font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.empty-state p { color: var(--mid); font-size: 15px; margin-bottom: 20px; }

/* ============================================ FOOTER ============================================ */
footer {
    background: var(--dark); color: rgba(255,255,255,0.6);
    text-align: center; padding: 28px 20px; font-size: 14px;
}
footer strong { color: var(--primary); }

/* ============================================ IMAGE UPLOAD ============================================ */
.image-upload-area {
    border: 2px dashed var(--border); border-radius: 12px; padding: 20px;
    text-align: center; cursor: pointer; transition: all var(--transition);
    background: var(--light);
}
.image-upload-area:hover { border-color: var(--primary); background: var(--secondary); }
.image-preview-placeholder { color: var(--mid); font-size: 14px; line-height: 1.8; }
.image-preview-placeholder img { max-height: 140px; border-radius: 8px; margin-bottom: 8px; }

/* ============================================ ADMIN PANEL ============================================ */
.admin-layout { display: flex; width: 100%; min-height: calc(100vh - var(--nav-h)); }

.admin-sidebar {
    width: 240px; background: var(--dark); color: var(--white);
    flex-shrink: 0; display: flex; flex-direction: column;
    padding-bottom: 24px; position: sticky; top: var(--nav-h);
    height: calc(100vh - var(--nav-h)); overflow-y: auto;
}
.admin-logo {
    display: flex; align-items: center; gap: 12px; padding: 24px 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1); font-family: var(--font-head);
    font-size: 16px; font-weight: 800; color: var(--white);
}
.admin-nav { padding: 16px 12px; flex: 1; }
.admin-nav-item {
    display: block; padding: 12px 16px; border-radius: 10px; font-size: 14px;
    font-weight: 700; color: rgba(255,255,255,0.65); cursor: pointer;
    transition: all var(--transition); margin-bottom: 4px;
}
.admin-nav-item:hover { background: rgba(233,30,140,0.2); color: var(--white); }
.admin-nav-item.active { background: var(--primary); color: var(--white); }

.admin-main { flex: 1; padding: 32px; background: var(--light); overflow-x: auto; }
.admin-heading { font-family: var(--font-head); font-size: 28px; font-weight: 900; margin-bottom: 24px; }
.admin-tab { display: none; }
.admin-tab.active { display: block; }
.admin-tab-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.admin-tab-header .admin-heading { margin-bottom: 0; }

/* Stats Grid */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.stat-card {
    background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius);
    padding: 20px; text-align: center; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.stat-card .stat-icon { font-size: 32px; margin-bottom: 8px; }
.stat-card .stat-value { font-family: var(--font-head); font-size: 28px; font-weight: 900; color: var(--primary); }
.stat-card .stat-label { font-size: 13px; color: var(--mid); font-weight: 600; margin-top: 4px; }

/* Revenue highlight cards */
.stat-card--revenue {
    border: none;
    color: #fff;
}
.stat-card--total-revenue {
    background: linear-gradient(135deg, #1a7a4a 0%, #27AE60 60%, #2ecc71 100%);
    box-shadow: 0 6px 24px rgba(39,174,96,0.35);
}
.stat-card--today-revenue {
    background: linear-gradient(135deg, #1565c0 0%, #1976d2 60%, #2196f3 100%);
    box-shadow: 0 6px 24px rgba(25,118,210,0.35);
}
.stat-card--revenue .stat-value { color: #fff; font-size: 30px; text-shadow: 0 1px 4px rgba(0,0,0,0.15); }
.stat-card--revenue .stat-label { color: rgba(255,255,255,0.85); font-size: 14px; font-weight: 700; }
.stat-card--revenue .stat-icon { font-size: 28px; margin-bottom: 4px; }
.stat-revenue-badge {
    position: absolute; top: 10px; right: 10px;
    background: rgba(255,255,255,0.25); color: #fff;
    font-size: 9px; font-weight: 800; letter-spacing: 1px;
    padding: 3px 7px; border-radius: 20px;
}
.stat-revenue-sub {
    font-size: 11px; color: rgba(255,255,255,0.75); margin-top: 6px; font-weight: 600;
}

/* Admin Tables */
.admin-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.admin-table th { background: var(--dark); color: var(--white); padding: 12px 16px; font-size: 12px; font-weight: 800; text-align: left; text-transform: uppercase; letter-spacing: 0.5px; }
.admin-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 14px; vertical-align: middle; }
.admin-table tr:hover td { background: var(--secondary); }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table .action-btns { display: flex; gap: 8px; }
.btn-edit { background: var(--primary-lt); color: var(--primary); border: none; padding: 6px 14px; border-radius: 8px; font-size: 12px; font-weight: 700; cursor: pointer; transition: all var(--transition); }
.btn-edit:hover { background: var(--primary); color: var(--white); }
.btn-delete { background: #FEE2E2; color: var(--danger); border: none; padding: 6px 14px; border-radius: 8px; font-size: 12px; font-weight: 700; cursor: pointer; transition: all var(--transition); }
.btn-delete:hover { background: var(--danger); color: var(--white); }
.btn-status { background: #EDE9FE; color: #7C3AED; border: none; padding: 6px 14px; border-radius: 8px; font-size: 12px; font-weight: 700; cursor: pointer; transition: all var(--transition); }
.btn-status:hover { background: #7C3AED; color: var(--white); }
.btn-view-order { background: var(--primary-lt); color: var(--primary); border: none; padding: 6px 12px; border-radius: 8px; font-size: 12px; font-weight: 700; cursor: pointer; transition: all var(--transition); white-space: nowrap; }
.btn-view-order:hover { background: var(--primary); color: var(--white); }

/* Order item pills in table */
.order-items-cell { max-width: 220px; }
.order-item-pill { display: inline-block; background: var(--secondary); color: var(--dark); border-radius: 20px; padding: 2px 8px; font-size: 11px; font-weight: 600; margin: 2px 2px 2px 0; white-space: nowrap; }

/* Admin Order Detail Modal */
.admin-order-detail { display: flex; flex-direction: column; gap: 20px; margin-top: 8px; }
.aod-header { display: flex; justify-content: space-between; align-items: flex-start; }
.aod-id { font-family: var(--font-head); font-size: 22px; font-weight: 900; color: var(--dark); }
.aod-date { font-size: 13px; color: var(--mid); margin-top: 2px; }
.aod-status { padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 800; text-transform: capitalize; }
.aod-section { background: var(--secondary); border-radius: 12px; padding: 14px 16px; }
.aod-section-title { font-size: 12px; font-weight: 800; color: var(--mid); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; }
.aod-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.aod-meta-label { display: block; font-size: 11px; color: var(--mid); font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; }
.aod-meta-val { display: block; font-size: 14px; font-weight: 700; color: var(--dark); margin-top: 2px; }
.aod-address { font-size: 14px; color: var(--dark); line-height: 1.5; }
.order-detail-table { width: 100%; border-collapse: collapse; }
.order-detail-table th { font-size: 11px; font-weight: 800; text-transform: uppercase; color: var(--mid); padding: 6px 8px; border-bottom: 1.5px solid var(--border); text-align: left; }
.order-detail-table th:last-child, .order-detail-table td:last-child { text-align: right; }
.order-detail-table th:nth-child(2), .order-detail-table td:nth-child(2) { text-align: center; }
.order-detail-table th:nth-child(3), .order-detail-table td:nth-child(3) { text-align: right; }
.order-detail-row td { padding: 9px 8px; border-bottom: 1px solid var(--border); font-size: 14px; }
.order-detail-row:last-child td { border-bottom: none; }
.odr-qty { text-align: center; font-weight: 700; color: var(--mid); }
.odr-price { text-align: right; color: var(--mid); }
.odr-sub { text-align: right; font-weight: 700; color: var(--dark); }
.aod-totals { border-top: 2px solid var(--border); padding-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.aod-total-row { display: flex; justify-content: space-between; font-size: 14px; color: var(--mid); }
.aod-grand-total { font-size: 18px; font-weight: 900; color: var(--primary); margin-top: 4px; border-top: 1.5px dashed var(--border); padding-top: 8px; }

/* Admin Menu item images */
.admin-thumb { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: var(--primary-lt); display: flex; align-items: center; justify-content: center; font-size: 24px; }
.admin-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }

/* ============================================ RESPONSIVE ============================================ */
@media (max-width: 900px) {
    .menu-layout { grid-template-columns: 1fr; }
    .cart-sidebar { position: static; max-height: none; }
    .checkout-layout { grid-template-columns: 1fr; }
    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; }
    .admin-nav { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px 12px; }
    .admin-nav-item { margin-bottom: 0; }
}
@media (max-width: 680px) {
    .profile-layout { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .payment-options { grid-template-columns: 1fr 1fr; }
    .restaurants-grid { grid-template-columns: 1fr; }
    .nav-search { display: none; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================ CAROUSEL ============================================ */
.carousel-wrapper {
    position: relative;
    width: 100%;
    height: 460px;
    overflow: hidden;
    background: var(--dark);
}
.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.65s cubic-bezier(0.77, 0, 0.175, 1);
    will-change: transform;
}
.carousel-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}
.carousel-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.55) saturate(1.15);
    transform: scale(1.04);
    transition: transform 8s ease;
}
.carousel-slide.is-active .carousel-bg {
    transform: scale(1);
}
.carousel-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(26,0,20,0.80) 40%, transparent 100%);
}
.carousel-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    padding: 0 60px;
    color: #fff;
    animation: slideUp 0.6s ease both;
}
@keyframes slideUp {
    from { opacity:0; transform:translateY(28px); }
    to   { opacity:1; transform:translateY(0); }
}
.carousel-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: rgba(193,123,138,0.20);
    color: #E8B4BF;
    border: 1px solid rgba(193,123,138,0.35);
    margin-bottom: 16px;
}
.carousel-content h2 {
    font-family: var(--font-head);
    font-size: clamp(28px, 4.5vw, 48px);
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 14px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}
.carousel-content p {
    font-size: 16px;
    color: rgba(255,255,255,0.78);
    margin-bottom: 28px;
    max-width: 440px;
    line-height: 1.65;
}
.carousel-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 30px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dk));
    color: #fff;
    border-radius: 100px;
    font-size: 15px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 28px rgba(233,30,140,0.45);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.carousel-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 36px rgba(233,30,140,0.55);
}

/* Arrows */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
    border: 1.5px solid rgba(255,255,255,0.18);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}
.carousel-arrow:hover { background: var(--primary); border-color: var(--primary); }
.carousel-prev { left: 20px; }
.carousel-next { right: 20px; }

/* Dots */
.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}
.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 100px;
    background: rgba(255,255,255,0.35);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}
.carousel-dot.active {
    width: 28px;
    background: var(--primary);
}

/* ============================================ ADMIN PAYMENTS ============================================ */
.payment-stat-card {
    flex: 1;
    min-width: 140px;
    padding: 16px 20px;
    border-radius: 14px;
    background: var(--white);
    border: 1.5px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: var(--shadow);
}
.payment-stat-card .ps-icon { font-size: 22px; margin-bottom: 4px; }
.payment-stat-card .ps-value { font-size: 22px; font-weight: 800; color: var(--dark); }
.payment-stat-card .ps-label { font-size: 12px; color: var(--mid); font-weight: 600; }

.approve-btn {
    background: linear-gradient(135deg, #27AE60, #1e8449);
    color: #fff;
    border: none;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.approve-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(39,174,96,0.35); }
.approve-btn.reject {
    background: linear-gradient(135deg, #E74C3C, #c0392b);
}
.payment-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}
.payment-badge.transfer { background: #FEF9E7; color: #F39C12; border: 1px solid #FDEAA7; }
.payment-badge.pos      { background: #EBF5FB; color: #2980B9; border: 1px solid #AED6F1; }
.payment-badge.cash     { background: #EAFAF1; color: #27AE60; border: 1px solid #A9DFBF; }
.payment-badge.paystack { background: #F5EEF8; color: #8E44AD; border: 1px solid #D2B4DE; }

@media (max-width: 768px) {
    .carousel-wrapper { height: 320px; }
    .carousel-content { padding: 0 24px; }
    .carousel-content h2 { font-size: 26px; }
    .carousel-content p { font-size: 14px; }
    .carousel-arrow { width: 36px; height: 36px; font-size: 20px; }
}

/* =============================================
   AUTO-REFRESH, NOTIFICATIONS, TABLE SEARCH
   ============================================= */

/* Pending orders badge on nav */
.admin-pending-badge {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--danger); color: #fff;
    font-size: 10px; font-weight: 900;
    min-width: 18px; height: 18px; border-radius: 9px;
    padding: 0 5px; margin-left: 8px;
    animation: badgePulse 1.5s ease-in-out infinite;
}
@keyframes badgePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%       { transform: scale(1.15); opacity: 0.85; }
}

/* Role badges in users table */
.role-badge {
    display: inline-block; padding: 3px 10px; border-radius: 20px;
    font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px;
}
.role-badge.role-admin    { background: var(--primary-lt); color: var(--primary); }
.role-badge.role-customer { background: var(--secondary);  color: var(--mid); }

/* Table search bar */
.table-search-wrap {
    display: flex; align-items: center; gap: 8px;
    background: var(--white); border: 1.5px solid var(--border);
    border-radius: 10px; padding: 8px 14px;
    margin-bottom: 12px; max-width: 360px;
    box-shadow: var(--shadow);
}
.table-search-icon { font-size: 15px; flex-shrink: 0; }
.table-search-input {
    border: none; outline: none; background: transparent;
    font-size: 14px; color: var(--dark); width: 100%;
    font-family: var(--font-body);
}
.table-search-input::placeholder { color: var(--mid); }

/* Auto-refresh indicator dot */
.refresh-dot {
    display: inline-block; width: 8px; height: 8px;
    border-radius: 50%; background: var(--success);
    margin-left: 6px; animation: refreshPulse 2s ease-in-out infinite;
}
@keyframes refreshPulse {
    0%, 100% { opacity: 1; } 50% { opacity: 0.3; }
}

/* =============================================
   LOOPING NEW ORDER ALERT BANNER
   ============================================= */
.new-order-alert-banner {
    position: fixed;
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #b71c1c, #e53935);
    color: #fff;
    padding: 14px 20px 14px 18px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(183,28,28,0.45), 0 0 0 3px rgba(255,255,255,0.15);
    min-width: 320px;
    max-width: 480px;
    transition: top 0.45s cubic-bezier(0.34,1.56,0.64,1);
    animation: bannerPulse 1s ease-in-out infinite;
}
.new-order-alert-banner.visible {
    top: 20px;
}
@keyframes bannerPulse {
    0%, 100% { box-shadow: 0 8px 32px rgba(183,28,28,0.45), 0 0 0 3px rgba(255,255,255,0.15); }
    50%       { box-shadow: 0 8px 40px rgba(183,28,28,0.7),  0 0 0 5px rgba(255,255,255,0.3); }
}
.noa-icon {
    font-size: 28px;
    animation: bellShake 0.6s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes bellShake {
    0%, 100% { transform: rotate(0deg); }
    20%       { transform: rotate(-18deg); }
    40%       { transform: rotate(18deg); }
    60%       { transform: rotate(-10deg); }
    80%       { transform: rotate(10deg); }
}
.noa-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}
.noa-text strong {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.2px;
}
.noa-text span {
    font-size: 12px;
    opacity: 0.85;
}
.noa-dismiss {
    background: rgba(255,255,255,0.2);
    border: 1.5px solid rgba(255,255,255,0.4);
    color: #fff;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
    flex-shrink: 0;
}
.noa-dismiss:hover {
    background: rgba(255,255,255,0.35);
}
