:root {
    --primary: #1a3a5c;
    --primary-light: #2c5282;
    --accent: #e8913a;
    --accent-hover: #d47c2e;
    --bg-light: #f8f6f3;
    --bg-white: #ffffff;
    --text-dark: #2d3748;
    --text-muted: #718096;
    --border: #e2e8f0;
    --success: #38a169;
    --danger: #e53e3e;
    --warning: #dd6b20;
    --info: #3182ce;
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
}

/* Navbar */
.navbar-custom {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    padding: 0;
}
.navbar-custom .navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff !important;
    letter-spacing: 1px;
}
.navbar-custom .navbar-brand span {
    color: var(--accent);
}
.navbar-custom .nav-link {
    color: rgba(255,255,255,0.85) !important;
    font-weight: 500;
    padding: 1rem 1.2rem !important;
    transition: all 0.3s;
}
.navbar-custom .nav-link:hover,
.navbar-custom .nav-link.active {
    color: #fff !important;
    background: rgba(255,255,255,0.1);
}

.navbar-custom .navbar-social .social-nav-link {
    color: rgba(255,255,255,0.9);
    font-size: 1.1rem;
    width: 2.1rem;
    height: 2.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, transform 0.2s;
}
.navbar-custom .navbar-social .social-nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.15);
    transform: translateY(-1px);
}

/* Hero */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-section h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
}
.hero-section p {
    font-size: 1.2rem;
    opacity: 0.9;
    position: relative;
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}
.card-img-top {
    height: 200px;
    object-fit: cover;
}

/* Menu Items */
.menu-item-card {
    border-radius: 12px;
    background: var(--bg-white);
}
.menu-item-card .card-body {
    padding: 1.2rem;
}
.menu-item-card .price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent);
}
.menu-item-card .item-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.3rem;
}
.menu-item-card .item-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
}
.menu-item-media-open {
    cursor: pointer;
}
.menu-item-title-open {
    cursor: pointer;
}
.menu-item-media-open:focus-visible,
.menu-item-title-open:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Category Pills */
.category-pills {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 20px 0;
}
.category-pill {
    padding: 8px 24px;
    border-radius: 50px;
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}
.category-pill:hover, .category-pill.active {
    background: var(--primary);
    color: #fff;
    text-decoration: none;
}

/* Buttons */
.btn-accent {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 24px;
    font-weight: 600;
    transition: all 0.3s;
}
.btn-accent:hover {
    background: var(--accent-hover);
    color: #fff;
    transform: translateY(-1px);
}
.btn-primary-custom {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
}
.btn-primary-custom:hover {
    background: var(--primary-light);
    color: #fff;
}

/* Cart Badge */
.cart-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--danger);
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Footer */
.footer {
    background: var(--primary);
    color: rgba(255,255,255,0.7);
    padding: 30px 0;
    margin-top: 60px;
}
.footer a { color: var(--accent); }

/* Status Badges */
.status-pending { background: #fefcbf; color: #975a16; }
.status-confirmed { background: #bee3f8; color: #2a4365; }
.status-preparing { background: #feebc8; color: #7b341e; }
.status-delivering { background: #c6f6d5; color: #22543d; }
.status-delivered { background: #c6f6d5; color: #22543d; }
.status-cancelled { background: #fed7d7; color: #9b2c2c; }

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
}

/* Admin */
.admin-sidebar {
    background: var(--primary);
    min-height: 100vh;
    padding-top: 20px;
}
.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.7) !important;
    padding: 12px 20px;
    border-radius: 8px;
    margin: 2px 10px;
    transition: all 0.3s;
}
.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: rgba(255,255,255,0.15);
    color: #fff !important;
}
.admin-sidebar .nav-link i {
    width: 24px;
    text-align: center;
    margin-right: 10px;
}

/* Live order highlight */
.orders-new-row {
    animation: ordersFlash 2.5s ease-out;
}

@keyframes ordersFlash {
    0% { background-color: rgba(232, 145, 58, 0.35); }
    100% { background-color: transparent; }
}

.stat-card {
    border-radius: 12px;
    padding: 24px;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.stat-card .stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}
.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
}
.stat-card .stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Quantity Controls */
.qty-control {
    display: flex;
    align-items: center;
    gap: 8px;
}
.qty-control button {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transition: all 0.2s;
}
.qty-control button:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.qty-control span {
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

/* Section Title */
.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 10px;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
}
.section-title.text-center::after {
    left: 50%;
    transform: translateX(-50%);
}

/* No image placeholder */
.no-image {
    height: 200px;
    background: linear-gradient(135deg, #e2e8f0, #edf2f7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 3rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section h1 { font-size: 2rem; }
    .hero-section { padding: 50px 0; }
    .admin-sidebar { min-height: auto; }
}

/* Order tracking */
.tracking-step {
    display: flex;
    align-items: center;
    padding: 15px 0;
    position: relative;
}
.tracking-step::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 50px;
    bottom: -15px;
    width: 2px;
    background: var(--border);
}
.tracking-step:last-child::before { display: none; }
.tracking-step .step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
    background: var(--border);
    color: var(--text-muted);
}
.tracking-step.active .step-icon {
    background: var(--success);
    color: #fff;
}
.tracking-step.current .step-icon {
    background: var(--accent);
    color: #fff;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(232,145,58,0.4); }
    50% { box-shadow: 0 0 0 10px rgba(232,145,58,0); }
}

/* Toast */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
}

/* Unavailable dish (option library / required group OOS) */
.menu-item-card.unavailable {
    opacity: 0.78;
}
.menu-item-card.unavailable:hover {
    transform: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
.menu-item-card.unavailable .card-img-top,
.menu-item-card.unavailable .no-image {
    filter: grayscale(0.85);
}
.menu-item-card.unavailable .menu-item-media-open,
.menu-item-card.unavailable .menu-item-title-open {
    cursor: not-allowed;
}
.menu-item-card .unavailable-media-wrap {
    position: relative;
}
.menu-item-card .unavailable-ribbon {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--danger);
    color: #fff;
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 4px 10px;
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    z-index: 2;
    pointer-events: none;
}
.menu-item-card .unavailable-inline {
    color: var(--danger);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.78rem;
}
.menu-item-card.unavailable .btn-accent {
    background: var(--text-muted);
    cursor: not-allowed;
    pointer-events: none;
}
.menu-item-card.unavailable .btn-accent:hover {
    transform: none;
}
