* { box-sizing: border-box; }
html { overflow-x: hidden; width: 100%; position: relative; }
body { margin: 0; font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif; background: #f6f7f9; color: #222; overflow-x: hidden; width: 100%; position: relative; min-height: 100vh; }
main { width: 100%; max-width: 100%; overflow-x: hidden; }
header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 0; }
.container { max-width: 960px; margin: 0 auto; padding: 0 1rem; width: 100%; box-sizing: border-box; }
.narrow { max-width: 520px; }
.card { background: #fff; border: 1px solid #e6e8eb; border-radius: 12px; padding: 1rem; margin: 1rem 0; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
label { display: block; font-weight: 600; margin-top: .5rem; margin-bottom: .25rem; position: relative; }
.info-icon { 
  display: inline-block;
  margin-left: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  opacity: 0.7;
  transition: opacity 0.2s, transform 0.2s;
  user-select: none;
}
.info-icon:hover { 
  opacity: 1;
  transform: scale(1.1);
}
.info-icon:active {
  transform: scale(0.95);
}
.info-box { 
  background: #e7f3ff; 
  border-left: 3px solid #0d6efd; 
  padding: 0.75rem; 
  border-radius: 4px; 
  margin-top: 0.5rem;
  line-height: 1.6;
}
.info-box strong { display: block; margin-bottom: 0.5rem; }
.info-box ol { margin: 0.5rem 0 0 0; padding-left: 1.5rem; }
.info-box li { margin: 0.3rem 0; }
.info-box a { color: #0d6efd; text-decoration: underline; }
input, textarea { width: 100%; padding: .6rem .7rem; border: 1px solid #cfd6df; border-radius: 8px; font-size: 1rem; }
textarea { resize: vertical; }
button, .btn { display: inline-block; padding: .6rem .9rem; background: #0d6efd; color: #fff; border: 0; border-radius: 8px; cursor: pointer; text-decoration: none; font-weight: 600; }
.btn.secondary { background: #6c757d; }
.btn.danger { background: #dc3545; }
nav a { margin-right: .6rem; }
.hint { color: #6b7280; font-size: .9rem; }
.error { color: #b00020; font-weight: 600; }
.hide-mobile { display: inline-block; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .75rem; }
.row { display: flex; align-items: center; gap: .75rem; }
.item { border: 1px solid #eceff3; border-radius: 10px; padding: .75rem; margin: .5rem 0; display: grid; grid-template-columns: 1fr auto; gap: .5rem; }
.item .meta { color: #6b7280; font-size: .9rem; }
.item strong { font-size: 1rem; }
.category { margin-top: 1rem; }
.category h3 { margin-bottom: .5rem; border-bottom: 1px dashed #e6e8eb; padding-bottom: .25rem; font-size: 1.2rem; }
.item .price { font-weight: 700; font-size: 1.1rem; color: #0d6efd; }

/* Kebab menu */
.menu { position: relative; }
.icon-btn { background: transparent; color: #111; border: 1px solid #cfd6df; border-radius: 8px; width: 36px; height: 36px; font-size: 20px; line-height: 1; display: grid; place-items: center; cursor: pointer; }
.icon-btn:hover { background: #f2f4f7; }
.dropdown { position: absolute; right: 0; top: 42px; background: #fff; border: 1px solid #e6e8eb; border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.08); min-width: 200px; padding: .25rem; z-index: 1000; }
.dropdown a, .dropdown .link-btn { display: block; width: 100%; text-align: left; padding: .6rem .75rem; color: #111; text-decoration: none; border: none; background: transparent; cursor: pointer; border-radius: 8px; font: inherit; }
.dropdown a:hover, .dropdown .link-btn:hover { background: #f6f7f9; }

/* Spinner */
.spinner-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 9999; }
.spinner { width: 48px; height: 48px; border: 4px solid #f3f3f3; border-top: 4px solid #0d6efd; border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.hidden { display: none !important; }

/* Pricing Cards */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; margin: 2rem 0; }
.pricing-card { background: #fff; border: 2px solid #e6e8eb; border-radius: 16px; padding: 2rem; position: relative; transition: transform 0.2s, box-shadow 0.2s; }
.pricing-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.pricing-card.featured { border-color: #0d6efd; box-shadow: 0 4px 12px rgba(13,110,253,0.15); }
.pricing-card.enterprise { border-color: #198754; box-shadow: 0 4px 12px rgba(25,135,84,0.15); background: linear-gradient(135deg, #ffffff 0%, #f0f9f4 100%); }
.pricing-card.enterprise .badge { background: #198754; }
.pricing-card .badge { position: absolute; top: -12px; right: 20px; background: #0d6efd; color: #fff; padding: 0.3rem 0.8rem; border-radius: 20px; font-size: 0.85rem; font-weight: 600; }
.plan-header { text-align: center; margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid #e6e8eb; }
.plan-header h2 { margin: 0 0 0.5rem 0; font-size: 1.5rem; }
.price-wrapper { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; }
.original-price { font-size: 1rem; color: #9ca3af; text-decoration: line-through; }
.price { font-size: 2rem; font-weight: 700; color: #0d6efd; }
.pricing-card.enterprise .price { color: #198754; }
.price span { font-size: 0.9rem; font-weight: 400; color: #6b7280; }
.features { list-style: none; padding: 0; margin: 0 0 1.5rem 0; }
.features li { padding: 0.6rem 0; border-bottom: 1px solid #f3f4f6; font-size: 0.95rem; }
.features li:last-child { border-bottom: none; }
.pricing-card button { width: 100%; margin-top: 1rem; }
.btn-enterprise { background: #198754 !important; }
.btn-enterprise:hover { background: #157347 !important; }
.plan-summary { background: #f6f7f9; padding: 1rem; border-radius: 8px; margin-bottom: 1rem; }
.plan-summary h3 { margin: 0 0 0.5rem 0; }

/* Landing Page Styles */
.landing-header { background: linear-gradient(135deg, #4c63d2 0%, #5a4a7a 100%); color: white; padding: 1rem 0; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.header-content { display: flex; justify-content: space-between; align-items: center; }
.logo h1 { margin: 0; font-size: 1.8rem; font-weight: 700; }
.landing-nav { display: flex; gap: 1.5rem; align-items: center; }
.landing-nav a { color: white; text-decoration: none; font-weight: 500; transition: opacity 0.2s; }
.landing-nav a:hover { opacity: 0.8; }
.btn-primary { background: #667eea !important; color: white !important; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }

/* Hero Section */
.hero { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 5rem 0; }
.hero-content { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.hero-title { font-size: 3rem; margin: 0 0 1rem 0; line-height: 1.2; }
.hero-subtitle { font-size: 1.25rem; margin: 0 0 2rem 0; opacity: 0.95; }
.hero-buttons { display: flex; gap: 1rem; margin-bottom: 1.5rem; }
.btn-large { padding: 1rem 2rem; font-size: 1.1rem; }
.btn-white { background: white; color: #667eea; }
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.2); }
.hero-note { font-size: 0.9rem; opacity: 0.9; }
.menu-preview { perspective: 1000px; }
.preview-card { background: white; color: #222; border-radius: 16px; padding: 2rem; box-shadow: 0 20px 60px rgba(0,0,0,0.3); transform: rotateY(-5deg); }
.preview-header { font-size: 1.3rem; font-weight: 700; margin-bottom: 1rem; text-align: center; }
.preview-item { display: flex; justify-content: space-between; padding: 0.75rem 0; border-bottom: 1px solid #e6e8eb; }
.preview-price { font-weight: 700; color: #667eea; }
.preview-footer { text-align: center; margin-top: 1rem; color: #6b7280; font-size: 0.9rem; }

/* Features Section */
.features-section { padding: 5rem 0; background: #f6f7f9; }
.section-title { text-align: center; font-size: 2.5rem; margin: 0 0 0.5rem 0; }
.section-subtitle { text-align: center; font-size: 1.1rem; color: #6b7280; margin: 0 0 3rem 0; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; }
.feature-card { background: white; padding: 2rem; border-radius: 12px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,0.05); transition: transform 0.2s, box-shadow 0.2s; }
.feature-card:hover { transform: translateY(-5px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
.feature-icon { font-size: 3rem; margin-bottom: 1rem; }
.feature-card h3 { margin: 0 0 0.5rem 0; font-size: 1.3rem; }
.feature-card p { color: #6b7280; margin: 0; }

/* How It Works */
.how-it-works { padding: 5rem 0; }
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.step-card { text-align: center; }
.step-number { width: 60px; height: 60px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; font-weight: 700; margin: 0 auto 1rem auto; }
.step-card h3 { margin: 0 0 0.5rem 0; font-size: 1.5rem; }
.step-card p { color: #6b7280; }

/* Pricing Teaser */
.pricing-teaser { padding: 5rem 0; background: #f6f7f9; }
.pricing-preview { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; max-width: 1000px; margin: 0 auto; }
.price-box { background: white; padding: 2rem; border-radius: 12px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,0.05); position: relative; }
.price-box.featured { border: 3px solid #667eea; box-shadow: 0 8px 24px rgba(102,126,234,0.2); }
.price-box.enterprise-box { border: 3px solid #198754; box-shadow: 0 8px 24px rgba(25,135,84,0.2); background: linear-gradient(135deg, #ffffff 0%, #f0f9f4 100%); }
.popular-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: #667eea; color: white; padding: 0.3rem 1rem; border-radius: 20px; font-size: 0.85rem; font-weight: 600; }
.price-box h3 { margin: 0 0 1rem 0; font-size: 1.5rem; }
.price-amount { font-size: 2rem; font-weight: 700; color: #667eea; margin-bottom: 0.5rem; }
.enterprise-box .price-amount { color: #198754; }
.price-amount span { font-size: 0.9rem; color: #6b7280; }

/* CTA Section */
.cta-section { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 4rem 0; text-align: center; }
.cta-content h2 { font-size: 2.5rem; margin: 0 0 1rem 0; }
.cta-content p { font-size: 1.2rem; margin: 0 0 2rem 0; opacity: 0.95; }

/* Footer */
.landing-footer { background: #1a1a1a; color: white; padding: 3rem 0 1rem 0; }
.footer-content { display: grid; grid-template-columns: 2fr 1fr; gap: 3rem; margin-bottom: 2rem; }
.footer-brand h3 { margin: 0 0 0.5rem 0; font-size: 1.5rem; }
.footer-brand p { color: #9ca3af; margin: 0; }
.footer-links { display: flex; gap: 3rem; }
.footer-column h4 { margin: 0 0 1rem 0; font-size: 1rem; }
.footer-column a { display: block; color: #9ca3af; text-decoration: none; margin-bottom: 0.5rem; }
.footer-column a:hover { color: white; }
.footer-bottom { text-align: center; padding-top: 2rem; border-top: 1px solid #333; color: #9ca3af; }

/* Responsive */
@media (max-width: 768px) {
  .hero-content { grid-template-columns: 1fr; }
  .hero-title { font-size: 2rem; }
  .landing-nav { gap: 1rem; }
  .landing-nav a:not(.btn) { display: none; }
  .footer-content { grid-template-columns: 1fr; }
  .preview-card { transform: none; }
  
  /* Admin page mobile improvements */
  .container { padding: 0 0.75rem; }
  .card { padding: 0.75rem; margin: 0.75rem 0; border-radius: 10px; }
  
  /* Header improvements */
  header { flex-direction: column; align-items: stretch; gap: 0.75rem; padding: 1rem 0; }
  header h1 { font-size: 1.4rem; margin: 0; text-align: center; }
  nav { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 0.5rem; 
    justify-content: center; 
  }
  nav a, nav button { 
    font-size: 0.85rem; 
    padding: 0.6rem 0.9rem; 
    white-space: nowrap;
    flex: 1;
    min-width: max-content;
    text-align: center;
  }
  nav #logout {
    flex-basis: 100%;
    margin-top: 0.25rem;
  }
  
  /* Form improvements */
  .grid { grid-template-columns: 1fr; gap: 0.75rem; }
  input, textarea, button, .btn { font-size: 16px; /* Prevents zoom on iOS */ }
  input, textarea {
    padding: 0.75rem;
  }
  button, .btn { 
    padding: 0.8rem 1rem; 
    width: 100%; 
    font-weight: 600;
    touch-action: manipulation;
  }
  label {
    font-size: 0.95rem;
    margin-top: 0.75rem;
  }
  .hint {
    font-size: 0.85rem;
    line-height: 1.4;
  }
  
  /* Item card improvements */
  .item { 
    grid-template-columns: 1fr; 
    gap: 0.75rem; 
    padding: 1rem; 
    border-radius: 10px;
  }
  .item .row { 
    flex-direction: column; 
    width: 100%; 
    gap: 0.5rem; 
  }
  .item .row button { width: 100%; margin: 0; }
  .item strong { font-size: 1.05rem; display: block; margin-bottom: 0.25rem; }
  .item .meta { font-size: 0.9rem; line-height: 1.4; }
  .item .price { 
    text-align: center; 
    font-size: 1.3rem; 
    padding: 0.6rem; 
    background: #e0f2fe; 
    border-radius: 8px; 
    margin: 0.5rem 0;
  }
  
  /* Category management improvements */
  .category { 
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 8px;
  }
  .category h3 { 
    font-size: 1.1rem; 
    margin-bottom: 0.75rem;
  }
  .category > div:first-child { 
    flex-direction: column; 
    align-items: stretch !important; 
    gap: 0.75rem !important; 
  }
  .category > div:first-child > div:last-child { 
    flex-direction: column; 
    width: 100%; 
    gap: 0.5rem;
  }
  .category > div:first-child > div:last-child > div { 
    width: 100%; 
    justify-content: space-between; 
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .category > div:first-child button { width: 100%; }
  
  .category-item { 
    flex-direction: column; 
    gap: 0.75rem; 
    align-items: stretch; 
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    margin-top: 0.5rem;
  }
  .category-item-name {
    font-size: 1rem;
    font-weight: 600;
  }
  .category-item-time {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 0.25rem;
  }
  .category-item-actions { 
    flex-direction: column-reverse; 
    width: 100%; 
    gap: 0.5rem;
  }
  .category-item-actions > div { 
    width: 100%; 
    display: flex;
    gap: 0.5rem;
  }
  .category-item-actions button { flex: 1; white-space: nowrap; }
  .category-order-buttons { 
    flex-direction: row; 
    justify-content: center; 
    gap: 0.5rem; 
  }
  .order-btn { 
    width: 48px; 
    height: 48px; 
    font-size: 1.4rem;
    flex: 0 0 48px;
  }
  
  /* Modal improvements */
  .modal-content { 
    width: 95%; 
    padding: 1.25rem; 
    max-height: 90vh;
    border-radius: 12px;
  }
  .modal-content h2 { font-size: 1.25rem; margin-bottom: 1rem; }
  .modal-content form { margin-top: 0.5rem; }
  
  /* Collapsible section improvements */
  h2[id$="-toggle"] { 
    font-size: 1.15rem; 
    padding: 0.5rem 0;
    margin: 0;
  }
  h2[id$="-toggle"] span:first-child { flex: 1; }
  h2[id$="-toggle"] span:last-child { 
    font-size: 1.4rem;
    margin-left: 0.5rem;
  }
  
  /* Restaurant info improvements */
  #restaurant-info { 
    font-size: 0.9rem; 
    line-height: 1.6;
  }
  #restaurant-info p {
    margin: 0.5rem 0;
  }
  
  /* Image preview improvements */
  #item-image-preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }
  #item-image-preview {
    max-width: 120px !important;
    max-height: 120px !important;
  }
  
  /* Better touch targets */
  .icon-btn { 
    min-width: 44px; 
    min-height: 44px; 
    touch-action: manipulation;
  }
  input[type="checkbox"] { 
    width: 20px !important; 
    height: 20px !important; 
    min-width: 20px;
    min-height: 20px;
  }
  input[type="time"] {
    padding: 0.75rem;
  }
  
  /* File input improvements */
  input[type="file"] {
    padding: 0.5rem;
    font-size: 14px;
  }
  
  /* Button groups */
  .row {
    align-items: center;
    gap: 0.75rem;
  }
  form .row {
    margin: 0.75rem 0;
  }
  
  /* Add category button */
  #add-category-btn {
    width: 100%;
    margin-top: 1rem;
  }
  
  /* Categories list */
  #categories-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }
  
  /* Prevent horizontal scroll */
  body { overflow-x: hidden; }
  
  /* Pricing grid mobile */
  .pricing-grid { grid-template-columns: 1fr; gap: 1rem; }
  
  /* Features grid mobile */
  .features-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  
  /* Steps grid mobile */
  .steps-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  
  /* Better spacing */
  .hero { padding: 3rem 0; }
  .features-section, .how-it-works, .pricing-teaser { padding: 3rem 0; }
  .section-title { font-size: 1.8rem; }
  
  /* Customer menu page improvements */
  .category-filter { 
    gap: 0.35rem; 
    padding: 0.65rem; 
  }
  .category-btn { 
    padding: 0.35rem 0.55rem; 
    font-size: 0.8rem;
  }
  
  /* Menu items display */
  .menu-simple .category { margin-top: 1.5rem; }
  .menu-simple .category h3 { 
    font-size: 1.2rem; 
    position: sticky;
    top: 0;
    background: #f6f7f9;
    padding: 0.75rem 0.5rem;
    margin: 0 -0.5rem 0.5rem -0.5rem;
    z-index: 10;
  }
  .menu-simple .item { 
    margin: 0.75rem 0;
    padding: 1rem;
  }
  .menu-simple .item strong { font-size: 1.1rem; }
  .menu-simple .item .meta { font-size: 0.9rem; line-height: 1.5; }
  .menu-simple .item .price { 
    font-size: 1.3rem; 
    text-align: right;
    margin-top: 0.5rem;
  }
  
  /* Menu item card mobile responsive - more compact */
  .category-card {
    margin-bottom: 1rem;
  }
  
  .category-card-title {
    padding: 0.85rem 1rem;
    font-size: 1.1rem;
  }
  
  .menu-item-card {
    padding: 0.75rem 1rem;
    gap: 0.65rem;
  }
  
  .menu-item-image {
    width: 70px;
    height: 70px;
  }
  
  .menu-item-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
  
  .menu-item-name {
    font-size: 0.95rem;
  }
  
  .menu-item-description {
    font-size: 0.8rem;
    line-height: 1.3;
  }
  
  .menu-item-price {
    font-size: 1.05rem;
  }
  
  /* Login/Signup pages */
  .narrow { max-width: 100%; padding: 0 0.75rem; }
  .card h1, .card h2 { font-size: 1.5rem; }
  .card form { margin-top: 1rem; }
  
  /* Pricing page mobile */
  .pricing-card { padding: 1.5rem; }
  .plan-header h2 { font-size: 1.3rem; }
  .price { font-size: 1.8rem; }
  .features { font-size: 0.9rem; }
  .features li { padding: 0.5rem 0; }
  
  /* Settings page mobile */
  .plan-summary { padding: 0.75rem; }
  .plan-summary h3 { font-size: 1.1rem; }
  
  /* Price preview boxes */
  .pricing-preview { grid-template-columns: 1fr; gap: 1rem; }
  .price-box { padding: 1.5rem; }
  .price-box h3 { font-size: 1.3rem; }
  .price-amount { font-size: 1.8rem; }
  
  /* CTA section */
  .cta-content h2 { font-size: 1.8rem; }
  .cta-content p { font-size: 1.05rem; }
  
  /* Footer */
  .footer-links { flex-direction: column; gap: 1.5rem; }
  .footer-brand h3 { font-size: 1.3rem; }
  
  /* Hero buttons mobile */
  .hero-buttons { flex-direction: column; }
  .btn-large { width: 100%; text-align: center; }
}

  /* Floating Action Menu (Social Links) */
  .fab-container {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 10000;
    max-width: calc(100vw - 32px);
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-end;
  }

  .fab-main {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: #0d6efd;
    color: #fff;
    display: grid;
    place-items: center;
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
    cursor: pointer;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
  }

  .fab-container.open .fab-main {
    transform: rotate(90deg);
  }

  /* Hamburger menu icon animation */
  .fab-icon {
    display: block;
  }

  .fab-line {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
  }

  .fab-container.open .fab-line-top {
    transform: translateY(4px) rotate(45deg);
  }

  .fab-container.open .fab-line-middle {
    opacity: 0;
    transform: scaleX(0);
  }

  .fab-container.open .fab-line-bottom {
    transform: translateY(-4px) rotate(-45deg);
  }

  .fab-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    margin-bottom: 12px;
    transform: translateY(20px) scale(0.8);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .fab-container.open .fab-actions {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }

  .fab-item {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.18);
    transition: transform 0.2s ease;
  }

  .fab-item:hover {
    transform: scale(1.1);
  }

  .fab-item svg { display: block; }

  .fab-wa { background: #25D366; }
  .fab-fb { background: #ffffff; color: #1877F2; }
  .fab-ig { background: radial-gradient( circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90% ); }
  .fab-gr { background: #f59e0b; }

  /* Install button (stacked above social FAB) */
  .fab-install {
    position: fixed;
    right: 16px;
    bottom: 88px; /* place above main FAB */
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: #111827; /* dark for contrast */
    color: #fff;
    display: grid;
    place-items: center;
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 10001;
    max-width: calc(100vw - 32px);
  }
  @media (max-width: 768px) {
    .fab-install { bottom: 82px; width: 46px; height: 46px; }
    .fab-container { right: 12px; bottom: 12px; }
  }

/* Small mobile devices */
@media (max-width: 480px) {
  .container { padding: 0 0.5rem; }
  .card { padding: 0.65rem; border-radius: 8px; margin: 0.65rem 0; }
  header h1 { font-size: 1.25rem; }
  header { padding: 0.75rem 0; gap: 0.5rem; }
  
  nav a, nav button { 
    font-size: 0.8rem; 
    padding: 0.55rem 0.7rem; 
  }
  
  .item { 
    padding: 0.85rem; 
    gap: 0.65rem;
  }
  .item strong { font-size: 0.95rem; }
  .item .meta { font-size: 0.8rem; line-height: 1.35; }
  .item .price { 
    font-size: 1.15rem; 
    padding: 0.5rem;
  }
  
  button, .btn { 
    font-size: 0.9rem; 
    padding: 0.7rem 0.85rem; 
  }
  
  input, textarea {
    padding: 0.65rem;
    font-size: 15px;
  }
  
  label {
    font-size: 0.9rem;
    margin-top: 0.65rem;
  }
  
  .hint {
    font-size: 0.8rem;
  }
  
  .category { 
    padding: 0.65rem;
    margin-bottom: 0.85rem;
  }
  .category h3 { 
    font-size: 1.05rem; 
    margin-bottom: 0.65rem;
  }
  .category-item {
    padding: 0.65rem;
    margin-top: 0.5rem;
  }
  .category-item-name { font-size: 0.95rem; }
  .category-item-time { font-size: 0.8rem; }
  
  .order-btn { 
    width: 42px; 
    height: 42px; 
    font-size: 1.15rem; 
    flex: 0 0 42px;
  }
  
  .modal-content { 
    padding: 1rem; 
    border-radius: 10px;
  }
  .modal-content h2 {
    font-size: 1.15rem;
  }
  
  h2[id$="-toggle"] { 
    font-size: 1.05rem; 
  }
  h2[id$="-toggle"] span:last-child { 
    font-size: 1.3rem;
  }
  
  #restaurant-info {
    font-size: 0.85rem;
    line-height: 1.5;
  }
  
  /* Hide desktop-only elements on mobile */
  .hide-mobile {
    display: none !important;
  }
  
  /* Center location info on mobile */
  #restaurant-info h2,
  #restaurant-info > div {
    text-align: center;
  }
  
  /* Make subscription buttons smaller and inline on mobile */
  #restaurant-info .btn {
    padding: 0.4rem 0.6rem !important;
    font-size: 0.8rem !important;
    white-space: nowrap;
  }
  
  #item-image-preview {
    max-width: 100px !important;
    max-height: 100px !important;
  }
  
  input[type="file"] {
    font-size: 13px;
    padding: 0.45rem;
  }
  
  /* FAB adjustments for small screens */
  .fab-container { right: 8px; bottom: 8px; }
  .fab-main { width: 50px; height: 50px; }
  .fab-item { width: 40px; height: 40px; }
  .fab-install { right: 8px; bottom: 72px; width: 42px; height: 42px; }
  
  /* Customer menu small screens */
  .menu-simple .category h3 { font-size: 1.05rem; }
  .menu-simple .item strong { font-size: 1rem; }
  .menu-simple .item .price { font-size: 1.2rem; }
  
  /* Category filter horizontal scroll */
  .category-btn { 
    padding: 0.45rem 0.75rem; 
    font-size: 0.8rem;
  }
  
  /* Smaller text on small screens */
  .section-title { font-size: 1.5rem; }
  .section-subtitle { font-size: 1rem; }
  .hero-title { font-size: 1.8rem; }
  .hero-subtitle { font-size: 1.05rem; }
  
  .pricing-card { padding: 1rem; }
  .price { font-size: 1.6rem; }
  .features { font-size: 0.85rem; }
}

/* Landscape mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .modal-content { max-height: 95vh; }
  header { padding: 0.5rem 0; }
}

/* Tablet improvements */
@media (min-width: 769px) and (max-width: 1024px) {
  .container { max-width: 720px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .item { grid-template-columns: 1fr auto; }
  .item .row { flex-direction: row; }
}

/* Menu Category Filter */
.category-filter { 
  display: flex; 
  gap: 0.5rem; 
  margin-bottom: 2rem; 
  padding: 1rem; 
  background: #f6f7f9; 
  border-radius: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  width: 100%;
  max-width: 100%;
}

#menu-items {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.category-filter::-webkit-scrollbar {
  height: 6px;
}
.category-filter::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}
.category-btn { 
  padding: 0.4rem 0.6rem; 
  background: white; 
  color: #222; 
  border: 2px solid #e6e8eb; 
  border-radius: 8px; 
  cursor: pointer; 
  font-weight: 600; 
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 0.85rem;
  min-width: fit-content;
  line-height: 1.2;
}
.category-btn:hover { border-color: #667eea; color: #667eea; }
.category-btn.active { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border-color: transparent; }
.category-btn.unavailable { 
  background: #f3f4f6; 
  color: #9ca3af; 
  border-color: #e5e7eb;
  cursor: default;
}
.category-btn.unavailable:hover { 
  border-color: #e5e7eb; 
  color: #9ca3af; 
}
.menu-simple { margin-top: 1rem; }

/* Location info icon tooltip */
.location-info-icon { position: relative; display: inline-flex; cursor: help; }
.location-info-icon:hover { opacity: 1 !important; }
.location-info-icon::after { 
  content: attr(title); 
  position: absolute; 
  bottom: 125%; 
  left: 50%; 
  transform: translateX(-50%); 
  background: #1f2937; 
  color: white; 
  padding: 0.5rem 0.75rem; 
  border-radius: 8px; 
  font-size: 0.85rem; 
  white-space: normal; 
  max-width: 300px; 
  width: max-content; 
  pointer-events: none; 
  opacity: 0; 
  transition: opacity 0.2s; 
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.location-info-icon:hover::after { opacity: 1; }
.location-info-icon::before { 
  content: ''; 
  position: absolute; 
  bottom: 115%; 
  left: 50%; 
  transform: translateX(-50%); 
  border: 6px solid transparent; 
  border-top-color: #1f2937; 
  opacity: 0; 
  transition: opacity 0.2s; 
  z-index: 1000;
}
.location-info-icon:hover::before { opacity: 1; }

/* Modal */
.modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; z-index: 10000; }
.modal.hidden { display: none !important; }
.modal-content { background: white; border-radius: 16px; padding: 2rem; max-width: 500px; width: 90%; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.modal-content h2 { margin-top: 0; }

/* Category Management */
.category-item { display: flex; align-items: center; justify-content: space-between; padding: 1rem; border: 1px solid #e6e8eb; border-radius: 10px; margin-bottom: 0.75rem; background: white; }
.category-item-info { flex: 1; }
.category-item-name { font-weight: 600; font-size: 1.05rem; margin-bottom: 0.25rem; }
.category-item-time { font-size: 0.85rem; color: #6b7280; }
.category-item-actions { display: flex; gap: 0.5rem; align-items: center; }
.category-order-buttons { display: flex; flex-direction: column; gap: 0.25rem; }
.order-btn { background: #f6f7f9; border: 1px solid #d1d5db; border-radius: 6px; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 1rem; }
.order-btn:hover { background: #e5e7eb; }
.order-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* Item Image Styles */
.item-thumbnail {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  background: #e5e7eb;
}

.item-image-container {
  width: 100%;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  position: relative;
  margin-bottom: 1rem;
  border-radius: 12px;
  overflow: hidden;
  background: #e5e7eb;
}

.item-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Menu Item Card Layout for Customer Menu */
.category-card {
  background: white;
  border: 1px solid #e6e8eb;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  width: 100%;
  max-width: 100%;
}

.category-card.unavailable {
  background: #f9fafb;
  opacity: 0.7;
}

.category-card.unavailable .category-card-title {
  background: #e5e7eb;
  color: #6b7280;
}

.category-card.unavailable .menu-item-name {
  color: #9ca3af;
}

.category-card.unavailable .menu-item-price {
  color: #9ca3af;
}

.category-card.unavailable .menu-item-description {
  color: #9ca3af;
}

.category-card.unavailable .menu-item-image {
  filter: grayscale(100%);
  opacity: 0.5;
}

.category-card-title {
  margin: 0;
  padding: 1rem 1.25rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  border-bottom: 2px solid #e6e8eb;
  background: #f9fafb;
}

.category-items {
  padding: 0;
  width: 100%;
  max-width: 100%;
}

.menu-item-row {
  position: relative;
  width: 100%;
  max-width: 100%;
}

.menu-item-row.with-divider {
  border-top: 1px solid #e6e8eb;
}

.menu-item-card {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: white;
  border: none;
  border-radius: 0;
  transition: background-color 0.2s;
  margin: 0;
  width: 100%;
  max-width: 100%;
}

.menu-item-card:hover {
  background-color: #f9fafb;
  transform: none;
  box-shadow: none;
}

.menu-item-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  background: #e5e7eb;
}

.menu-item-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.menu-item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
}

.menu-item-name {
  font-size: 1rem;
  font-weight: 600;
  color: #1f2937;
  flex: 1;
  min-width: 0;
}

.menu-item-description {
  font-size: 0.85rem;
  color: #6b7280;
  line-height: 1.4;
}

.menu-item-price {
  font-size: 1rem;
  font-weight: 700;
  color: #0d6efd;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Icon Button Styles */
.btn-icon {
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid #d1d5db;
  background: #f3f4f6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

.btn-icon:hover {
  background: #e5e7eb;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-icon:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.btn-icon:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-icon svg {
  pointer-events: none;
}

/* Icon button color variants */
.btn-icon[data-del] {
  background: #fee2e2;
  border-color: #fecaca;
  color: #dc2626;
}

.btn-icon[data-del]:hover {
  background: #fecaca;
  border-color: #fca5a5;
}

.btn-icon[data-edit] {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #374151;
}

.btn-icon[data-edit]:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
}

.btn-icon[data-cat-edit] {
  background: #e0f2fe;
  border-color: #bae6fd;
  color: #0369a1;
}

.btn-icon[data-cat-edit]:hover {
  background: #bae6fd;
  border-color: #7dd3fc;
}

/* Compact item cards */
.item {
  transition: background-color 0.15s ease;
}

.item:hover {
  background-color: #f9fafb;
}

/* Header 3-dot dropdown menu */
#menu-toggle-btn {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

#menu-toggle-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

#menu-toggle-btn:hover::before {
  width: 100px;
  height: 100px;
}

#menu-toggle-btn:hover {
  background: #0b5ed7 !important;
  border-color: #0b5ed7 !important;
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(13, 110, 253, 0.4);
}

#menu-toggle-btn:active {
  background: #0a58ca !important;
  border-color: #0a58ca !important;
  transform: scale(0.95);
  box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3);
}

#menu-toggle-btn svg {
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease;
}

#menu-toggle-btn:hover svg {
  transform: rotate(90deg);
}

#header-dropdown-menu {
  animation: dropdownFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.98) !important;
  border: 2px solid #e5e7eb !important;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-15px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

#header-dropdown-menu a {
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

#header-dropdown-menu a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 3px;
  background: linear-gradient(180deg, #0d6efd, #0b5ed7);
  transform: translateX(-3px);
  transition: transform 0.3s ease;
}

#header-dropdown-menu a:hover::before {
  transform: translateX(0);
}

#header-dropdown-menu a:hover {
  background: linear-gradient(90deg, #f0f7ff 0%, #ffffff 100%) !important;
  padding-left: 1.25rem !important;
  color: #0d6efd;
}

#header-dropdown-menu a:active {
  background: linear-gradient(90deg, #e0f0ff 0%, #f8f9fa 100%) !important;
  transform: scale(0.98);
}

#header-dropdown-menu a svg {
  transition: all 0.3s ease;
}

#header-dropdown-menu a:hover svg {
  transform: translateX(3px) scale(1.1);
  color: #0d6efd;
}

/* Responsive header navigation */
@media (max-width: 768px) {
  header nav {
    gap: 0.4rem !important;
  }
  
  header nav > a {
    display: none !important;
  }
  
  header nav > button#logout {
    display: inline-flex !important;
  }
}

/* Auth pages (login/signup) responsive design */
@media (max-width: 768px) {
  .narrow {
    padding: 0 1rem;
  }
  
  .narrow h1 {
    font-size: 1.3rem !important;
  }
  
  .narrow form label {
    font-size: 0.9rem;
  }
  
  .narrow form input,
  .narrow form textarea {
    font-size: 1rem;
    padding: 0.7rem;
  }
  
  .narrow form button {
    font-size: 1rem;
    padding: 0.75rem 1rem;
  }
  
  #header-dropdown-menu {
    min-width: 160px;
  }
  
  #header-dropdown-menu a {
    font-size: 0.9rem;
    padding: 0.65rem 0.85rem;
  }
  
  #header-dropdown-menu svg {
    width: 16px;
    height: 16px;
  }
}

/* Tablet view adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
  .narrow {
    max-width: 600px;
  }
  
  .container {
    padding: 0 2rem;
  }
}

/* Small mobile phones */
@media (max-width: 480px) {
  .narrow h1 {
    font-size: 1.1rem !important;
  }
  
  .narrow form {
    padding: 1rem;
  }
  
  .narrow form input,
  .narrow form textarea {
    font-size: 0.95rem;
    padding: 0.65rem;
  }
  
  .narrow form button {
    font-size: 0.95rem;
    padding: 0.7rem 0.9rem;
  }
  
  .hint {
    font-size: 0.85rem;
  }
  
  #menu-toggle-btn {
    min-width: 36px !important;
    min-height: 36px !important;
    padding: 0.4rem !important;
  }
  
  #menu-toggle-btn svg {
    width: 18px;
    height: 18px;
  }
  
  #header-dropdown-menu {
    min-width: 140px;
  }
  
  #header-dropdown-menu a {
    font-size: 0.85rem;
    padding: 0.6rem 0.75rem;
  }
}

/* Desktop large screens */
@media (min-width: 1200px) {
  .narrow {
    max-width: 560px;
  }
  
  .container {
    max-width: 1140px;
  }
}


