@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --primary: #5b5ce2;
  --primary-glow: rgba(91, 92, 226, 0.15);
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: rgba(15, 23, 42, 0.08);
  --radius: 20px;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: 'Plus Jakarta Sans', sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.02em; }
a { color: inherit; text-decoration: none; transition: 0.2s; }
img { max-width: 100%; height: auto; display: block; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.grid { display: grid; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.w-full { width: 100%; }
.text-center { text-align: center; }

/* Scrollbars */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.2); }

/* Components */
.card { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); padding: 32px; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 14px 28px; border-radius: 16px; font-weight: 700; border: 0; cursor: pointer; transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1); font-family: inherit; font-size: 14px; }
.btn:active { transform: scale(0.96); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 10px 20px var(--primary-glow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 15px 25px var(--primary-glow); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: #f8fafc; border-color: var(--text); }
.btn-danger { background: #fee2e2; color: #dc2626; }
.btn-danger:hover { background: #fecaca; }

.input, .select { width: 100%; padding: 14px 20px; border-radius: 16px; border: 1px solid var(--border); font-family: inherit; font-size: 15px; background: #fff; transition: 0.2s; }
.input:focus, .select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-glow); }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group span { font-size: 13px; font-weight: 700; opacity: 0.6; }

.badge { padding: 4px 10px; border-radius: 8px; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.badge.success { background: #ecfdf5; color: #059669; }
.badge.gray { background: #f1f5f9; color: #64748b; }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 16px; background: #fff; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { background: #f8fafc; padding: 16px; font-size: 12px; font-weight: 800; color: var(--muted); border-bottom: 1px solid var(--border); }
td { padding: 16px; border-bottom: 1px solid var(--border); }

.nav-link { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; color: rgba(255,255,255,0.6); font-weight: 700; font-size: 14px; }
.nav-link:hover, .nav-link.active { color: #fff; background: rgba(255,255,255,0.05); }
.nav-link.active { background: var(--primary); color: #fff; }

/* Menu Public */
.header { position: sticky; top: 0; background: rgba(255,255,255,0.8); backdrop-filter: blur(20px); z-index: 100; padding: 16px 0; border-bottom: 1px solid var(--border); }
.category-nav { display: flex; gap: 12px; overflow-x: auto; padding: 12px 0; scrollbar-width: none; }
.category-nav::-webkit-scrollbar { display: none; }
.cat-item { flex: 0 0 auto; padding: 10px 24px; border-radius: 999px; background: #fff; border: 1px solid var(--border); font-weight: 700; color: var(--muted); cursor: pointer; }
.cat-item.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; padding: 24px 0; }
.menu-card { background: #fff; border-radius: 24px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); transition: 0.3s; cursor: pointer; }
.menu-card:hover { transform: translateY(-8px); }
.menu-card-img { height: 200px; position: relative; }
.menu-card-img img { width: 100%; height: 100%; object-fit: cover; }
.menu-card-body { padding: 20px; }
.menu-card-price { font-size: 1.5rem; font-weight: 800; color: var(--text); }

@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.animate-up { animation: fadeInUp 0.5s ease-out both; }

@media (max-width: 768px) {
  .menu-grid { gap: 16px; }
}

/* Layouts */
.admin-shell { display: flex; min-height: 100vh; overflow-x: hidden; position: relative; }
.sidebar { 
    width: 280px; 
    background: #0f172a; 
    color: #fff; 
    padding: 40px 24px; 
    flex-shrink: 0; 
    display: flex; 
    flex-direction: column; 
    position: sticky; 
    top: 0; 
    height: 100vh; 
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2000;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1999;
    backdrop-filter: blur(8px);
}
.mobile-admin-header {
    display: none;
    padding: 12px 20px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1500;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.main-content { flex: 1; padding: 40px; min-width: 0; background: var(--bg); display: flex; flex-direction: column; align-items: center; }
.admin-shell main > .container, .admin-shell main > .admin-shell { width: 100%; max-width: 1200px; }
.admin-shell .card { width: 100%; }
.sidebar.active ~ .main-content { overflow: hidden; height: 100vh; }
.admin-two-col { display: grid; grid-template-columns: 1fr 1.5fr; gap: 40px; align-items: start; width: 100%; max-width: 1200px; }

@media (max-width: 1024px) {
    .sidebar { position: fixed; left: 0; transform: translateX(-100%); box-shadow: 20px 0 50px rgba(0,0,0,0.2); }
    .sidebar.active { transform: translateX(0); }
    .sidebar.active ~ .sidebar-overlay { display: block; }
    .mobile-admin-header { display: flex; }
    .main-content { padding: 80px 16px 40px; }
    .admin-two-col { grid-template-columns: 1fr; gap: 24px; }
}

/* Hamburger Icon */
#sidebarToggle { width: 44px; height: 44px; padding: 0; border: 0; background: #f1f5f9; border-radius: 12px; position: relative; }
#sidebarToggle span { display: block; width: 22px; height: 2.5px; background: #0f172a; border-radius: 5px; position: absolute; left: 11px; transition: 0.3s; }
#sidebarToggle span:nth-child(1) { top: 14px; }
#sidebarToggle span:nth-child(2) { top: 21px; }
#sidebarToggle span:nth-child(3) { top: 28px; }
#sidebarToggle.active span:nth-child(1) { transform: rotate(45deg); top: 21px; }
#sidebarToggle.active span:nth-child(2) { opacity: 0; }
#sidebarToggle.active span:nth-child(3) { transform: rotate(-45deg); top: 21px; }
