/* ========== RESET & BASE ========== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root,
[data-theme="dark"] {
  --bg-primary: #0a0a0a;
  --bg-secondary: #141414;
  --bg-card: #1a1a1a;
  --bg-card-hover: #222;
  --text-primary: #f5f5f5;
  --text-secondary: #a0a0a0;
  --accent: #c9a96e;
  --accent-hover: #dbbf8a;
  --accent-dim: rgba(201, 169, 110, 0.15);
  --green: #4ade80;
  --red: #f87171;
  --border: #2a2a2a;
  --header-bg: rgba(10, 10, 10, 0.92);
  --tabs-bg: rgba(10, 10, 10, 0.95);
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --body-bg: #050505;
}

[data-theme="light"] {
  --bg-primary: #f5f5f0;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f0ede6;
  --text-primary: #1a1a1a;
  --text-secondary: #666666;
  --accent: #a68942;
  --accent-hover: #c9a96e;
  --accent-dim: rgba(166, 137, 66, 0.1);
  --green: #22c55e;
  --red: #ef4444;
  --border: #e0ddd6;
  --header-bg: rgba(245, 245, 240, 0.92);
  --tabs-bg: rgba(245, 245, 240, 0.95);
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --body-bg: #eae8e0;
}

:root {
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.3s ease;
  --max-width: 480px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition), color var(--transition);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
ul { list-style: none; }

/* ========== LAYOUT ========== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg-primary);
  position: relative;
  transition: background var(--transition);
}

/* ========== HEADER ========== */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  gap: 8px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.header-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-back {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--text-secondary);
  transition: color var(--transition);
  flex-shrink: 0;
}
.header-back:hover { color: var(--text-primary); }
.header-back svg { width: 18px; height: 18px; }

/* ========== THEME TOGGLE ========== */
.theme-toggle-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  transition: all var(--transition);
  flex-shrink: 0;
}
.theme-toggle-btn svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
}
.theme-toggle-btn:hover {
  border-color: var(--accent);
}

/* ========== LANGUAGE SELECTOR ========== */
.lang-selector {
  display: flex;
  gap: 3px;
  background: var(--bg-secondary);
  border-radius: 20px;
  padding: 3px;
  flex-shrink: 0;
}

.lang-btn {
  padding: 4px 8px;
  border-radius: 16px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all var(--transition);
  color: var(--text-secondary);
}

.lang-btn.active {
  background: var(--accent);
  color: #fff;
}

[data-theme="light"] .lang-btn.active {
  color: #fff;
}

.lang-btn:hover:not(.active) {
  color: var(--text-primary);
}

/* ========== HERO SECTION ========== */
.hero {
  position: relative;
  height: 260px;
  overflow: hidden;
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 30%, var(--bg-primary) 100%);
}

/* ========== RESTAURANT / HOTEL IDENTITY ========== */
.restaurant-identity {
  text-align: center;
  padding: 0 16px;
  margin-top: -50px;
  position: relative;
  z-index: 2;
}

.restaurant-logo {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  object-fit: cover;
  margin: 0 auto 10px;
  background: var(--bg-secondary);
}

.restaurant-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.restaurant-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ========== MENU CTA BUTTON ========== */
.menu-cta {
  display: flex;
  margin: 20px 16px;
  padding: 14px;
  background: var(--accent);
  color: #fff;
  text-align: center;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all var(--transition);
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.menu-cta:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201, 169, 110, 0.3);
}

.menu-cta svg { width: 20px; height: 20px; }

/* ========== RESTAURANT CARDS (Hotel Homepage) ========== */
.restaurant-cards {
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.restaurant-card {
  display: flex;
  gap: 14px;
  padding: 14px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
}

.restaurant-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.restaurant-card-img {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.restaurant-card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.restaurant-card-name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
}

.restaurant-card-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.restaurant-card-hours {
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.restaurant-card-hours .status-dot {
  width: 6px;
  height: 6px;
}

/* Other restaurants (horizontal scroll) */
.other-restaurants {
  padding: 0 16px;
  margin-bottom: 8px;
}

.other-restaurants-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 4px;
}

.other-restaurants-scroll::-webkit-scrollbar { display: none; }

.other-restaurant-card {
  flex-shrink: 0;
  width: 140px;
  text-align: center;
  cursor: pointer;
  transition: transform var(--transition);
}

.other-restaurant-card:hover { transform: translateY(-2px); }

.other-restaurant-card img {
  width: 140px;
  height: 95px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  margin-bottom: 6px;
  border: 1px solid var(--border);
}

.other-restaurant-card span {
  font-size: 12px;
  font-weight: 600;
  display: block;
}

/* ========== WIFI SECTION ========== */
.wifi-section {
  margin: 16px;
  padding: 16px 20px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.wifi-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wifi-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wifi-info svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex-shrink: 0;
}

.wifi-name {
  font-size: 14px;
  font-weight: 600;
}

.wifi-password-row {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
}

.wifi-password-text {
  font-family: monospace;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--accent);
}

.wifi-toggle-btn {
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 16px;
  background: var(--accent-dim);
  color: var(--accent);
  transition: all var(--transition);
}

.wifi-toggle-btn:hover {
  background: var(--accent);
  color: #fff;
}

/* ========== INFO SECTIONS ========== */
.info-section {
  margin: 16px;
  padding: 20px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.info-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-title svg { width: 16px; height: 16px; }

/* Clickable Hotel Info title (opens a PDF/URL) */
.info-title-link {
  cursor: pointer;
  transition: color var(--transition);
}
.info-title-link:hover { color: var(--accent-hover); }
.info-title .info-title-ext {
  margin-left: auto;
  opacity: 0.85;
}

/* Optional per-restaurant note (between description and menu button) */
.restaurant-note {
  margin: 14px 16px 0;
  padding: 10px 14px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius);
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
}

/* Working Hours */
.working-hours {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hours-time {
  font-size: 20px;
  font-weight: 600;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.status-badge.open {
  background: rgba(74, 222, 128, 0.12);
  color: var(--green);
}

.status-badge.closed {
  background: rgba(248, 113, 113, 0.12);
  color: var(--red);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Address & Phone */
.info-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.info-row svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--accent);
}

.info-row a {
  color: var(--text-secondary);
  transition: color var(--transition);
}
.info-row a:hover { color: var(--accent); }

/* Social Links */
.social-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.social-link:hover {
  background: var(--accent-dim);
  color: var(--accent);
}

.social-link svg { width: 20px; height: 20px; flex-shrink: 0; }

/* ========== SECTION TITLE ========== */
.section-heading {
  padding: 20px 16px 10px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-heading svg { width: 16px; height: 16px; }

/* ========== FOOTER ========== */
.footer {
  text-align: center;
  padding: 24px 16px;
  color: var(--text-secondary);
  font-size: 12px;
  border-top: 1px solid var(--border);
  margin: 16px;
}

/* ========== MENU PAGE ========== */
/* Category Grid */
.category-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px;
}

.category-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
  transition: transform var(--transition);
}

.category-card:hover { transform: scale(1.02); }

.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.category-card:hover img { transform: scale(1.08); }

.category-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.1) 60%);
  display: flex;
  align-items: flex-end;
  padding: 12px;
}

.category-card-name {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
}

/* Category Tabs */
.category-tabs-wrapper {
  position: sticky;
  top: 49px;
  z-index: 90;
  background: var(--tabs-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.category-tabs {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 10px 16px;
  gap: 8px;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.category-tabs.dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

.category-tabs::-webkit-scrollbar { display: none; }

.category-tab {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: all var(--transition);
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
}

.category-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.category-tab:hover:not(.active) {
  border-color: var(--accent);
  color: var(--text-primary);
}

/* Menu Category Sections (scroll-spy layout) */
.menu-category-section {
  padding-top: 8px;
}

.menu-category-header {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  padding: 12px 0 8px;
  border-bottom: 2px solid var(--accent);
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}

.menu-category-name { display: block; }

/* Optional category description, between the name and the divider line */
.menu-category-desc {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0;
  line-height: 1.5;
  margin-top: 6px;
}

/* Menu Items List */
.menu-items {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.menu-item-card {
  display: flex;
  gap: 14px;
  padding: 14px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: border-color var(--transition);
}

.menu-item-card:hover {
  border-color: var(--accent-dim);
}

.menu-item-img {
  width: 90px;
  height: 90px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.menu-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.menu-item-name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.menu-item-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.menu-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.menu-item-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
}

.menu-item-weight {
  font-size: 11px;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  padding: 2px 8px;
  border-radius: 10px;
}

/* View: categories vs items */
.view-categories,
.view-items,
.view-favorites {
  display: none;
}
.view-categories.active,
.view-items.active,
.view-favorites.active {
  display: block;
}

/* ========== FAVORITES ========== */
/* Favorite toggle button in header */
.header-fav-btn {
  position: relative;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  transition: all var(--transition);
  flex-shrink: 0;
}
.header-fav-btn svg {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.header-fav-btn:hover {
  border-color: var(--accent);
}
.header-fav-btn.has-items svg {
  color: #ef4444;
  fill: #ef4444;
}
.header-fav-btn .fav-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}

/* Heart button on menu items */
.menu-item-fav-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 50%;
  transition: all var(--transition);
  align-self: center;
}
.menu-item-fav-btn svg {
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
  transition: all 0.25s ease;
  stroke-width: 2;
}
.menu-item-fav-btn:hover svg {
  color: #ef4444;
  transform: scale(1.15);
}
.menu-item-fav-btn.active svg {
  color: #ef4444;
  fill: #ef4444;
  animation: heartPop 0.35s ease;
}

@keyframes heartPop {
  0% { transform: scale(1); }
  30% { transform: scale(1.35); }
  60% { transform: scale(0.9); }
  100% { transform: scale(1); }
}

/* Favorites Panel */
.favorites-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.favorites-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.favorites-title svg {
  width: 18px;
  height: 18px;
  color: #ef4444;
  fill: #ef4444;
}

.favorites-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  padding: 2px 8px;
  border-radius: 10px;
}

.favorites-clear-btn {
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 16px;
  background: rgba(248, 113, 113, 0.12);
  color: var(--red);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 5px;
}
.favorites-clear-btn svg {
  width: 13px;
  height: 13px;
}
.favorites-clear-btn:hover {
  background: rgba(248, 113, 113, 0.25);
}

.favorites-hint {
  padding: 12px 16px;
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
  background: var(--accent-dim);
  border-bottom: 1px solid var(--border);
}

.favorites-list {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.favorites-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
}
.favorites-empty svg {
  width: 48px;
  height: 48px;
  color: var(--border);
  margin-bottom: 12px;
}
.favorites-empty p {
  font-size: 14px;
  margin-bottom: 4px;
}
.favorites-empty span {
  font-size: 12px;
}

/* ========== ADMIN PAGE ========== */
.admin-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.admin-login {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 16px;
}

.admin-login h1 {
  font-size: 24px;
  color: var(--accent);
}

.admin-panel { display: none; }
.admin-panel.active { display: block; }
.admin-login.hidden { display: none; }

/* Admin Tabs */
.admin-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 24px;
  overflow-x: auto;
}

.admin-tab {
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: all var(--transition);
  color: var(--text-secondary);
}

.admin-tab.active {
  background: var(--accent);
  color: #fff;
}

/* Admin Form Elements */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  transition: border-color var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-textarea { resize: vertical; min-height: 80px; }

/* Admin Cards */
.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.admin-card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--accent);
}

/* Buttons */
.btn {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

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

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--accent); }

.btn-danger {
  background: rgba(248, 113, 113, 0.12);
  color: var(--red);
}
.btn-danger:hover { background: rgba(248, 113, 113, 0.25); }

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Toggle Switch */
.toggle-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
}

.toggle-label {
  font-size: 14px;
  font-weight: 500;
}

.toggle {
  position: relative;
  width: 44px;
  height: 24px;
}

.toggle input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg-secondary);
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: all var(--transition);
  cursor: pointer;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--text-secondary);
  left: 2px;
  top: 2px;
  transition: all var(--transition);
}

.toggle input:checked + .toggle-slider {
  background: var(--accent);
  border-color: var(--accent);
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(20px);
  background: #fff;
}

/* Admin Item List */
.admin-item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.admin-item-row img {
  width: 50px;
  height: 50px;
  border-radius: 6px;
  object-fit: cover;
}

.admin-item-info { flex: 1; min-width: 0; }

.admin-item-name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-item-meta {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.active { display: flex; }

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  width: 100%;
  max-width: 500px;
  max-height: 85vh;
  overflow-y: auto;
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--accent);
}

/* Checkbox list for multi-select */
.checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
}

.checkbox-item input[type="checkbox"] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}

/* ========== IMAGE PREVIEW ========== */
.img-preview {
  margin-top: 8px;
  position: relative;
}

.img-preview img {
  max-width: 100%;
  max-height: 160px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  object-fit: cover;
}

.img-preview .img-preview-error {
  color: var(--red);
  font-size: 12px;
}

.img-preview .img-preview-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

.fade-in {
  animation: fadeIn 0.4s ease forwards;
}

.fade-in-up {
  opacity: 0;
  animation: fadeInUp 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.fade-in-scale {
  opacity: 0;
  animation: fadeInScale 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.slide-in-right {
  opacity: 0;
  animation: slideInRight 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.slide-in-left {
  opacity: 0;
  animation: slideInLeft 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* View transition */
#viewCategories, #viewItems {
  transition: opacity 0.2s ease;
}

/* Smooth tab indicator */
.category-tab {
  transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ========== RESPONSIVE ========== */
@media (min-width: 481px) {
  .container {
    box-shadow: var(--shadow);
  }

  body {
    display: flex;
    justify-content: center;
    background: var(--body-bg);
  }
}

@media (min-width: 768px) {
  .admin-container {
    padding: 32px;
  }

  .category-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ========== EXPANDABLE ITEM DESCRIPTION ========== */
/* Truncated descriptions can be tapped to show the full text */
.menu-item-desc.expandable {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.menu-item-desc.expanded {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
  color: var(--text-primary);
}

/* ========== AD POPUP (restaurant page) ========== */
.ad-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.62);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
  touch-action: none;
}

.ad-overlay.active {
  opacity: 1;
  visibility: visible;
}

.ad-sheet {
  position: relative;
  width: 100%;
  max-width: var(--max-width);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 22px 22px 0 0;
  max-height: 88vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  transform: translateY(100%);
  transition: transform 0.38s cubic-bezier(0.22, 0.8, 0.3, 1);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45);
}

.ad-overlay.active .ad-sheet {
  transform: translateY(0);
}

.ad-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background var(--transition), transform 0.15s ease;
}

.ad-close:hover { background: rgba(0, 0, 0, 0.8); }
.ad-close:active { transform: scale(0.92); }
.ad-close svg { width: 18px; height: 18px; }

.ad-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--bg-secondary);
}

.ad-body {
  padding: 20px 20px calc(24px + env(safe-area-inset-bottom, 0px));
}

.ad-sheet.no-image .ad-body {
  padding-top: 26px;
}

.ad-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
  padding-right: 36px;
}

.ad-text {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-secondary);
}

/* Ad text: one <p> per line, bullet lines grouped in a list */
.ad-text p { margin: 0; }
.ad-text p + p { margin-top: 3px; }
.ad-text .ad-gap { height: 8px; }
.ad-text .ad-list {
  list-style: none;
  margin: 6px 0;
  padding: 0;
}
.ad-text .ad-list + p { margin-top: 6px; }
.ad-text .ad-list li {
  position: relative;
  padding-left: 16px;
  margin-top: 3px;
}
.ad-text .ad-list li::before {
  content: '•';
  position: absolute;
  left: 2px;
  color: var(--accent);
  font-weight: 700;
}

/* Admin: taller text areas for ad text */
.ad-textarea { min-height: 120px; }

.ad-btn {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  padding: 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  transition: background var(--transition);
}

.ad-btn:hover { background: var(--accent-hover); }
.ad-btn svg { width: 18px; height: 18px; }

body.ad-open {
  overflow: hidden;
}

/* ========== ADMIN: AD STATUS ========== */
.status-pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.status-pill.active  { background: rgba(74, 222, 128, 0.15);  color: var(--green); }
.status-pill.stopped { background: rgba(248, 113, 113, 0.15); color: var(--red); }
.status-pill.pending { background: rgba(251, 191, 36, 0.15);  color: #fbbf24; }

.admin-item-row .admin-item-meta .status-pill { margin-right: 6px; }

/* Ad view counter (admin) */
.ad-views-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.ad-views {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--accent);
}

.ad-views svg { width: 14px; height: 14px; }
.ad-views b { font-weight: 700; }

.ad-views-last { color: var(--text-secondary); }

.ad-views-reset {
  font-size: 11px;
  color: var(--text-secondary);
  text-decoration: underline;
  padding: 0 2px;
}
.ad-views-reset:hover { color: var(--accent); }

/* Ad popup: optional contact phone row (between text and button) */
.ad-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 14px;
  background: var(--accent-dim);
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.ad-phone svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
  flex-shrink: 0;
}

.ad-phone-label {
  color: var(--text-secondary);
  white-space: nowrap;
}

.ad-phone-number {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.2px;
}

.ad-phone + .ad-btn { margin-top: 14px; }

.status-pill.off { background: rgba(160, 160, 160, 0.18); color: var(--text-secondary); }

/* Admin: filters row + select-all tools in checkbox lists */
.admin-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.checkbox-tools {
  display: flex;
  gap: 6px;
  margin-bottom: 2px;
}

/* Admin: monitoring (favorite counters) */
.mon-row { align-items: center; }

.mon-rank {
  width: 26px;
  flex-shrink: 0;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
}

.mon-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
}

.mon-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
}

.mon-count {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 56px;
  color: var(--accent);
}
.mon-count b { font-size: 18px; line-height: 1.1; }
.mon-count span { font-size: 10px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }
