/* ============================================
   DRAGON PALACE v3 — SHARED STYLESHEET
   Changelog:
   - Logo displayed without forced background
   - Hero with no forced color (transparent-ready)
   - Category row styles
   - Customer theme page styles
   ============================================ */

/* LIGHT THEME */
:root, [data-theme="light"] {
  --primary:#5B2C6F; --primary-light:#7D3C98; --primary-dark:#3D1A4F;
  --primary-glow:rgba(91,44,111,.10); --primary-glow-strong:rgba(91,44,111,.18);
  --bg-base:#F7F5FA; --bg-card:#FFFFFF; --bg-card-hover:#F3F0F8;
  --bg-surface:#F0EDF7; --bg-border:#E3DCF0; --bg-border-strong:#C9BDE0;
  --text-primary:#1A102A; --text-secondary:#56497A; --text-muted:#9A90AA;
  --text-on-primary:#FFFFFF;
  --green:#1D8348; --green-bg:#E9F7EF; --green-border:#A9DFBF;
  --red:#C0392B; --red-bg:#FDECEA; --red-border:#F0B0A8;
  --yellow:#C27C0E; --yellow-bg:#FEF9E7; --yellow-border:#F9D68A;
  --blue:#1A6FAE; --blue-bg:#EBF4FB; --blue-border:#8AC3EB;
  --gray:#6B7280; --gray-bg:#F3F4F6; --gray-border:#D1D5DB;
  --purple:#6B21A8; --purple-bg:#F5EBFB; --purple-border:#D9B8EE;
  --shadow-xs:0 1px 3px rgba(0,0,0,.05); --shadow-sm:0 2px 8px rgba(0,0,0,.08);
  --shadow-md:0 4px 20px rgba(0,0,0,.10); --shadow-lg:0 8px 40px rgba(0,0,0,.12);
  --shadow-purple:0 4px 20px rgba(91,44,111,.18);
  --topbar-bg:#FFFFFF; --sidebar-bg:#FFFFFF;
}
/* DARK THEME */
[data-theme="dark"] {
  --primary:#9B59B6; --primary-light:#BB8FCE; --primary-dark:#6C3483;
  --primary-glow:rgba(155,89,182,.15); --primary-glow-strong:rgba(155,89,182,.25);
  --bg-base:#0D0D0F; --bg-card:#141418; --bg-card-hover:#1C1C22;
  --bg-surface:#1A1A20; --bg-border:#2B2B38; --bg-border-strong:#3E3E52;
  --text-primary:#F0EDF6; --text-secondary:#9890AA; --text-muted:#5A5270;
  --text-on-primary:#0D0D0F;
  --green:#2ECC71; --green-bg:rgba(46,204,113,.10); --green-border:rgba(46,204,113,.25);
  --red:#E74C3C; --red-bg:rgba(231,76,60,.10); --red-border:rgba(231,76,60,.25);
  --yellow:#F39C12; --yellow-bg:rgba(243,156,18,.10); --yellow-border:rgba(243,156,18,.25);
  --blue:#3498DB; --blue-bg:rgba(52,152,219,.10); --blue-border:rgba(52,152,219,.25);
  --gray:#9CA3AF; --gray-bg:rgba(156,163,175,.10); --gray-border:rgba(156,163,175,.25);
  --purple:#C084FC; --purple-bg:rgba(192,132,252,.10); --purple-border:rgba(192,132,252,.25);
  --shadow-xs:0 1px 3px rgba(0,0,0,.30); --shadow-sm:0 2px 8px rgba(0,0,0,.40);
  --shadow-md:0 4px 20px rgba(0,0,0,.50); --shadow-lg:0 8px 40px rgba(0,0,0,.60);
  --shadow-purple:0 4px 20px rgba(155,89,182,.22);
  --topbar-bg:#141418; --sidebar-bg:#141418;
}

/* RESET */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{font-family:'DM Sans','Segoe UI',sans-serif;background:var(--bg-base);color:var(--text-primary);line-height:1.6;-webkit-font-smoothing:antialiased;transition:background .3s,color .3s}
a{text-decoration:none;color:inherit}
ul{list-style:none}
img{max-width:100%;display:block}
button{cursor:pointer;border:none;background:none;font-family:inherit}
input,select,textarea{font-family:inherit}

/* BUTTONS */
.btn-primary{background:var(--primary);color:#fff;border:none;padding:10px 22px;border-radius:8px;font-size:14px;font-weight:700;cursor:pointer;transition:all .2s;letter-spacing:.2px}
.btn-primary:hover{background:var(--primary-light);box-shadow:var(--shadow-purple);transform:translateY(-1px)}
.btn-secondary{background:var(--bg-surface);color:var(--text-primary);border:1.5px solid var(--bg-border);padding:10px 22px;border-radius:8px;font-size:14px;font-weight:600;cursor:pointer;transition:all .2s}
.btn-secondary:hover{background:var(--bg-card-hover)}
.btn-outline{background:transparent;color:var(--primary);border:1.5px solid var(--primary);padding:9px 18px;border-radius:8px;font-size:13px;font-weight:700;cursor:pointer;transition:all .2s}
.btn-outline:hover{background:var(--primary-glow)}
.btn-danger{background:var(--red-bg);color:var(--red);border:1.5px solid var(--red-border);padding:9px 18px;border-radius:8px;font-size:13px;font-weight:700;cursor:pointer;transition:all .2s}
.btn-danger:hover{background:var(--red);color:#fff}

/* BADGES */
.badge{display:inline-flex;align-items:center;gap:5px;padding:3px 9px;border-radius:999px;font-size:11px;font-weight:700;letter-spacing:.4px;text-transform:uppercase;border:1px solid}
.badge-green{background:var(--green-bg);color:var(--green);border-color:var(--green-border)}
.badge-red{background:var(--red-bg);color:var(--red);border-color:var(--red-border)}
.badge-yellow{background:var(--yellow-bg);color:var(--yellow);border-color:var(--yellow-border)}
.badge-blue{background:var(--blue-bg);color:var(--blue);border-color:var(--blue-border)}
.badge-gray{background:var(--gray-bg);color:var(--gray);border-color:var(--gray-border)}
.badge-purple{background:var(--primary-glow);color:var(--primary);border-color:var(--bg-border)}

/* FORMS */
.form-group{margin-bottom:16px}
.form-label{display:block;font-size:11px;font-weight:800;color:var(--text-secondary);margin-bottom:6px;letter-spacing:.6px;text-transform:uppercase}
.form-input{width:100%;background:var(--bg-surface);border:1.5px solid var(--bg-border);border-radius:8px;padding:11px 14px;color:var(--text-primary);font-size:14px;outline:none;transition:all .2s}
.form-input:focus{border-color:var(--primary);box-shadow:0 0 0 3px var(--primary-glow);background:var(--bg-card)}
.form-input::placeholder{color:var(--text-muted)}
select.form-input{appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239A90AA' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 13px center;padding-right:34px}
.form-row-2{display:grid;grid-template-columns:1fr 1fr;gap:14px}

/* MODALS */
.modal-overlay{position:fixed;inset:0;background:rgba(0,0,0,.5);backdrop-filter:blur(8px);z-index:1000;display:flex;align-items:center;justify-content:center;padding:20px;opacity:0;pointer-events:none;transition:opacity .3s}
.modal-overlay.active{opacity:1;pointer-events:all}
.modal{background:var(--bg-card);border:1.5px solid var(--bg-border);border-radius:20px;padding:28px;width:100%;max-width:520px;transform:translateY(24px) scale(.97);transition:all .35s cubic-bezier(.16,1,.3,1);max-height:90vh;overflow-y:auto;box-shadow:var(--shadow-lg)}
.modal.modal-lg{max-width:680px}
.modal-overlay.active .modal{transform:translateY(0) scale(1)}
.modal-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:22px;padding-bottom:16px;border-bottom:1px solid var(--bg-border)}
.modal-title{font-size:18px;font-weight:800;letter-spacing:-.3px}
.modal-subtitle{font-size:12px;color:var(--text-muted);margin-top:2px}
.modal-close{width:32px;height:32px;border-radius:8px;background:var(--bg-surface);border:1px solid var(--bg-border);color:var(--text-secondary);font-size:16px;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .2s;flex-shrink:0}
.modal-close:hover{background:var(--red-bg);color:var(--red);border-color:var(--red-border)}

/* TOAST */
#toast-container{position:fixed;bottom:24px;right:24px;z-index:9999;display:flex;flex-direction:column;gap:9px;pointer-events:none}
.toast{background:var(--bg-card);border:1px solid var(--bg-border);border-radius:10px;padding:13px 16px;font-size:13px;font-weight:500;box-shadow:var(--shadow-lg);display:flex;align-items:center;gap:10px;animation:slideInR .3s cubic-bezier(.16,1,.3,1);min-width:250px;max-width:340px;pointer-events:all}
.toast.toast-success{border-left:3px solid var(--green)}
.toast.toast-error{border-left:3px solid var(--red)}
.toast.toast-info{border-left:3px solid var(--primary)}
.toast.toast-warning{border-left:3px solid var(--yellow)}
.toast-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}
.toast-success .toast-dot{background:var(--green)}
.toast-error .toast-dot{background:var(--red)}
.toast-info .toast-dot{background:var(--primary)}
.toast-warning .toast-dot{background:var(--yellow)}
@keyframes slideInR{from{opacity:0;transform:translateX(40px)}to{opacity:1;transform:translateX(0)}}

/* THEME TOGGLE */
.theme-toggle{width:38px;height:38px;border-radius:9px;background:var(--bg-surface);border:1.5px solid var(--bg-border);color:var(--text-secondary);font-size:17px;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .2s}
.theme-toggle:hover{background:var(--primary-glow);color:var(--primary);border-color:var(--primary)}

/* ============================================
   CUSTOMER — HEADER
   FIX #2: logo-img-box has NO forced background
   ============================================ */
.site-header{position:relative;z-index:10;background:var(--bg-card);border-bottom:1px solid var(--bg-border);box-shadow:var(--shadow-xs);transition:background .3s,border-color .3s}
.header-inner{max-width:1200px;margin:0 auto;padding:0 24px;height:66px;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:16px}
.header-left{display:flex;align-items:center;gap:7px;font-size:14px;font-weight:600;color:var(--text-secondary);justify-self:start;grid-column:1}
.header-left .ph-link{color:var(--primary);font-weight:700}
.header-left .ph-link:hover{text-decoration:underline}
.logo{display:flex;align-items:center;justify-content:center;gap:0;padding:0;margin:0}
.site-header .header-logo{grid-column:2;justify-self:center}

/* Header logo: image only, max height within fixed header */
.site-header .logo-img-box{
  width:auto;height:46px;max-height:46px;min-width:28px;max-width:180px;
  border-radius:0;padding:0;margin:0;
  background:transparent;
  display:flex;align-items:center;justify-content:center;
  font-size:20px;flex-shrink:0;overflow:hidden;
}
.logo-img-box{
  width:38px;height:38px;border-radius:9px;
  background:transparent;
  display:flex;align-items:center;justify-content:center;
  font-size:20px;flex-shrink:0;overflow:hidden;
}
.logo-img-box img{width:auto;height:100%;max-width:100%;max-height:100%;object-fit:contain;display:block}

.logo-text{font-size:18px;font-weight:900;letter-spacing:-.5px;color:var(--primary)}
.header-right{display:flex;align-items:center;justify-content:flex-end;gap:9px;grid-column:3;justify-self:end}
.cart-btn{display:flex;align-items:center;gap:8px;background:var(--primary);color:#fff;border:none;padding:9px 16px;border-radius:8px;font-size:14px;font-weight:700;cursor:pointer;transition:all .2s}
.cart-btn:hover{background:var(--primary-light);box-shadow:var(--shadow-purple)}
.cart-count{background:#fff;color:var(--primary);width:20px;height:20px;border-radius:50%;font-size:11px;font-weight:900;display:flex;align-items:center;justify-content:center}

/* ============================================
   CUSTOMER — HERO
   FIX #3: Fully transparent/neutral — no color,
   no overlay tint. Banner image shows cleanly.
   ============================================ */
.hero{
  position:relative;min-height:340px;display:flex;align-items:center;justify-content:center;
  padding:70px 24px;text-align:center;overflow:hidden;
  /* FIX #3: completely transparent background */
  background:transparent;
}
/* FIX #3: no color overlay — removed entirely */
.hero-bg{position:absolute;inset:0;background-size:cover;background-position:center;display:none}
/* hero overlay removed (no color tint over banner) */
.hero-content{position:relative;z-index:1;max-width:620px;margin:0 auto;color:#fff}
/* When no banner: hero text still needs contrast — set dark bg via body/html or page bg */
.hero h1{font-size:clamp(26px,5vw,46px);font-weight:900;letter-spacing:-1px;line-height:1.1;margin-bottom:14px;color:#fff}
.hero h1 span{color:#D7B0FC}
.hero p{font-size:16px;color:rgba(255,255,255,.85);margin-bottom:30px}
.hero-search{display:flex;max-width:500px;margin:0 auto;background:rgba(255,255,255,.12);backdrop-filter:blur(12px);border:1px solid rgba(255,255,255,.22);border-radius:14px;overflow:hidden;box-shadow:0 8px 32px rgba(0,0,0,.3)}
.hero-search input{flex:1;background:none;border:none;padding:15px 18px;color:#fff;font-size:15px;outline:none}
.hero-search input::placeholder{color:rgba(255,255,255,.5)}
.hero-search button{background:var(--primary);color:#fff;border:none;padding:15px 22px;font-size:14px;font-weight:700;cursor:pointer;transition:all .2s;white-space:nowrap}
.hero-search button:hover{background:var(--primary-light)}

/* CATEGORIES & MENU */
.section{max-width:1200px;margin:0 auto;padding:0 24px}
.section-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}
.section-title{font-size:20px;font-weight:800;letter-spacing:-.3px}
.categories-section{width:100%;padding:6px 0 10px;overflow:visible}
.category-sticky-sentinel{height:1px;width:100%;margin:0;padding:0;pointer-events:none}
.category-bar-placeholder{display:block;height:0;overflow:hidden;transition:height .15s ease}
.category-bar-wrap{
  position:relative;z-index:95;width:100%;
  margin:0;padding:10px 16px 12px;
  background:transparent;border:none;box-shadow:none;
  transition:background .2s, box-shadow .2s, border-color .2s;
}
.category-bar-wrap.is-stuck{
  position:fixed;top:0;left:0;right:0;width:100%;
  background:var(--cust-cat-bar-bg, var(--bg-card));
  border-bottom:1px solid var(--bg-border);
  box-shadow:var(--shadow-xs);
  padding:10px 16px 12px;
}
.category-filters-scroll{
  overflow-x:auto;overflow-y:visible;
  -webkit-overflow-scrolling:touch;
  scroll-behavior:smooth;scrollbar-width:none;
  overscroll-behavior-x:contain;
  overscroll-behavior-y:auto;
}
.category-filters-scroll::-webkit-scrollbar{display:none}
.category-filters{
  display:flex;gap:10px;flex-wrap:nowrap;
  width:max-content;min-width:100%;
  padding:8px 56px 8px 4px;
}
.category-btn{display:flex;align-items:center;gap:7px;padding:8px 16px;border-radius:999px;border:1.5px solid var(--bg-border);background:var(--bg-card);color:var(--text-secondary);font-size:13px;font-weight:600;cursor:pointer;transition:all .2s;box-shadow:var(--shadow-xs)}
.category-btn:hover{border-color:var(--primary);color:var(--primary);background:var(--primary-glow)}
.category-btn.active{background:var(--primary);border-color:var(--primary);color:#fff;box-shadow:var(--shadow-purple)}
.menu-section{padding:26px 0 60px}
.menu-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(255px,1fr));gap:20px}
.dish-card{background:var(--bg-card);border:1.5px solid var(--bg-border);border-radius:16px;overflow:hidden;transition:all .3s cubic-bezier(.16,1,.3,1);box-shadow:var(--shadow-xs)}
.dish-card:hover{transform:translateY(-5px);box-shadow:0 2px 28px var(--primary-glow-strong)}
.dish-img{width:100%;height:175px;object-fit:cover;background:var(--bg-surface)}
.dish-img-ph{width:100%;height:175px;background:linear-gradient(135deg,var(--bg-surface),var(--bg-border));display:flex;align-items:center;justify-content:center;font-size:52px}
.dish-body{padding:15px}
.dish-cat{font-size:10px;font-weight:800;letter-spacing:1px;text-transform:uppercase;color:var(--primary);margin-bottom:5px}
.dish-name{font-size:15px;font-weight:800;margin-bottom:5px;letter-spacing:-.2px}
.dish-desc{font-size:12px;color:var(--text-secondary);margin-bottom:13px;line-height:1.55;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.dish-footer{display:flex;align-items:center;justify-content:space-between}
.dish-price{font-size:17px;font-weight:900;color:var(--primary)}
.add-btn{width:36px;height:36px;border-radius:8px;background:var(--primary);color:#fff;border:none;font-size:22px;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .2s}
.add-btn:hover{background:var(--primary-light);transform:scale(1.1);box-shadow:var(--shadow-purple)}
.no-results{grid-column:1/-1;text-align:center;padding:60px 20px;color:var(--text-muted)}
.no-results h3{font-size:16px;margin-bottom:6px;color:var(--text-secondary)}
#category-menu-sections .category-menu-block.menu-section{padding:26px 0 12px}
#category-menu-sections .category-menu-block.menu-section:last-child{padding-bottom:48px}
.floating-cart-btn{
  position:fixed;bottom:22px;left:50%;transform:translateX(-50%);
  z-index:450;display:inline-flex;align-items:center;gap:8px;
  padding:11px 20px;border-radius:999px;
  background:var(--primary);color:#fff;border:none;
  font-size:14px;font-weight:700;cursor:pointer;
  box-shadow:var(--shadow-lg);transition:opacity .2s, transform .2s;
}
.floating-cart-btn:hover{background:var(--primary-light);transform:translateX(-50%) translateY(-2px)}
.floating-cart-btn .cart-count{background:#fff;color:var(--primary)}

/* FOOTER */
.site-footer{background:var(--bg-card);border-top:1px solid var(--bg-border);padding:44px 24px 28px}
.footer-inner{max-width:1200px;margin:0 auto;display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:32px;margin-bottom:28px}
.footer-brand-name{font-size:19px;font-weight:900;color:var(--primary);margin-bottom:7px}
.footer-tagline{font-size:13px;color:var(--text-secondary);line-height:1.6}
.footer-col-title{font-size:10px;font-weight:800;letter-spacing:1.2px;text-transform:uppercase;color:var(--text-muted);margin-bottom:13px}
.footer-col-list{display:flex;flex-direction:column;gap:8px}
.footer-col-list li{font-size:13px;color:var(--text-secondary);display:flex;gap:8px;align-items:flex-start}
.footer-bottom{max-width:1200px;margin:0 auto;padding-top:18px;border-top:1px solid var(--bg-border);display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:10px;font-size:12px;color:var(--text-muted)}
.footer-bottom-left{justify-self:start}
.footer-bottom-right{justify-self:end;text-align:right}
.footer-credit{justify-self:center;font-size:12px;font-weight:700;color:var(--primary);text-decoration:none;transition:color .2s}
.footer-credit:hover{color:var(--primary-light);text-decoration:underline}
body.dp-loading #dp-site-shell{visibility:hidden}
body.dp-ready #dp-site-shell{visibility:visible}
body.dp-loading #dp-dash-shell{visibility:hidden}
body.dp-ready #dp-dash-shell{visibility:visible}
.footer-brand-logo{margin-bottom:8px;min-height:0}
.footer-tagline{font-size:13px;color:var(--text-muted);margin:0;line-height:1.45}
.confirm-order-hint{font-size:12px;color:var(--text-muted);margin-bottom:10px}
.order-id-row{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap}
.order-id-text{font-family:'JetBrains Mono',monospace;font-size:20px;font-weight:700;color:var(--primary);letter-spacing:1px}
.copy-btn{padding:8px 14px;font-size:12px;flex-shrink:0}
.track-page-section{max-width:720px;margin:0 auto;padding:32px 20px 48px}
.track-page-title{font-size:26px;font-weight:900;margin-bottom:6px;color:var(--text-primary)}
.track-page-sub{font-size:14px;color:var(--text-secondary);margin-bottom:22px}
.track-error-msg{display:none;font-size:13px;color:var(--red);margin-top:12px}
.track-order-id-display{font-family:'JetBrains Mono',monospace;font-size:18px;font-weight:700;color:var(--primary);margin-bottom:18px}
.track-progress-bar{display:flex;align-items:flex-start;justify-content:space-between;gap:4px;position:relative;margin:24px 0 8px;padding:0 4px}
.track-progress-bar::before{content:'';position:absolute;top:11px;left:8%;right:8%;height:3px;background:var(--bg-border);z-index:0;border-radius:2px}
.track-progress-bar::after{content:'';position:absolute;top:11px;left:8%;width:calc((100% - 16%) * var(--track-fill, 0) / 100);max-width:84%;height:3px;background:var(--primary);z-index:0;border-radius:2px;transition:width .35s ease}
.track-step{flex:1;text-align:center;position:relative;z-index:1;min-width:0}
.track-step-dot-wrap{display:flex;justify-content:center;margin-bottom:8px}
.track-step-dot{width:14px;height:14px;border-radius:50%;border:2px solid var(--bg-border);background:var(--bg-card);display:inline-block;transition:all .25s}
.track-step.step-done .track-step-dot{background:var(--primary);border-color:var(--primary)}
.track-step.step-active .track-step-dot{background:var(--primary);border-color:var(--primary);box-shadow:0 0 0 4px var(--primary-glow),0 0 12px var(--primary-glow-strong)}
.track-step.step-upcoming .track-step-dot{background:var(--bg-card)}
.track-step-label{font-size:10px;font-weight:700;color:var(--text-muted);line-height:1.25;padding:0 2px}
.track-step.step-active .track-step-label,.track-step.step-done .track-step-label{color:var(--primary)}
.track-cancelled-msg{text-align:center;font-size:15px;font-weight:700;color:var(--red);padding:20px;border:1px solid var(--red-border);background:var(--red-bg);border-radius:10px}
@media(max-width:600px){
  .track-step-label{font-size:9px}
  .track-step-dot{width:12px;height:12px}
}
.home-carousel-section{padding:26px 0 0;overflow:visible}
.home-carousel-section .section{overflow:visible}
.home-carousel-wrap{
  position:relative;
  overflow-x:auto;
  overflow-y:visible;
  margin:0;
  padding:0;
  scroll-behavior:smooth;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior-x:contain;
  overscroll-behavior-y:auto;
  scrollbar-width:none;
  -ms-overflow-style:none;
}
.home-carousel-wrap::-webkit-scrollbar{display:none}
/* Vertical margin only: matches .dish-card:hover translateY(-5px) and .menu-grid gap 20px */
.home-carousel-wrap .menu-grid{margin:5px 0 20px 0}
.home-carousel-wrap .dish-card:first-child{margin-left:0;padding-left:0}
#popular-carousel-wrap,
#deals-carousel-wrap,
#popular-carousel-wrap *,
#deals-carousel-wrap *{cursor:default!important}
#popular-carousel-wrap .add-btn,
#deals-carousel-wrap .add-btn{cursor:pointer!important}
.carousel-scroll-hint{
  position:absolute;right:12px;top:50%;
  transform:translateY(-50%);
  font-size:24px;font-weight:700;color:var(--text-muted);
  opacity:0;pointer-events:none;line-height:1;
  background:none;border:none;padding:0;
  transition:opacity .35s ease;
}
.home-carousel-wrap.hint-visible .carousel-scroll-hint{opacity:.5}
.home-carousel-wrap.hint-pulse .carousel-scroll-hint{
  animation:carousel-hint-nudge 2.2s ease-in-out infinite;
}
@keyframes carousel-hint-nudge{
  0%,100%{opacity:.35;transform:translateY(-50%) translateX(0)}
  50%{opacity:.75;transform:translateY(-50%) translateX(7px)}
}
.home-carousel-wrap.hint-dismissed .carousel-scroll-hint{display:none}
.home-carousel-section.is-hidden{display:none!important}
.home-carousel-section.is-empty{display:none}
.wa-fab{position:fixed;bottom:28px;right:28px;z-index:500;width:56px;height:56px;background:#25D366;border-radius:50%;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 20px rgba(37,211,102,.4);color:#fff;font-size:28px;transition:all .2s;border:3px solid #fff}
.wa-fab:hover{transform:scale(1.1);box-shadow:0 6px 28px rgba(37,211,102,.5)}

/* CART */
.cart-overlay{position:fixed;inset:0;background:rgba(0,0,0,.4);backdrop-filter:blur(4px);z-index:500;opacity:0;pointer-events:none;transition:opacity .3s}
.cart-overlay.active{opacity:1;pointer-events:all}
.cart-drawer{position:fixed;top:0;right:0;bottom:0;width:100%;max-width:400px;background:var(--bg-card);border-left:1px solid var(--bg-border);z-index:501;display:flex;flex-direction:column;transform:translateX(100%);transition:transform .35s cubic-bezier(.16,1,.3,1);box-shadow:var(--shadow-lg)}
.cart-drawer.active{transform:translateX(0)}
.cart-header{padding:18px 20px;border-bottom:1px solid var(--bg-border);display:flex;align-items:center;justify-content:space-between}
.cart-header h2{font-size:17px;font-weight:800}
.cart-items{flex:1;overflow-y:auto;padding:14px;display:flex;flex-direction:column;gap:10px}
.cart-item{background:var(--bg-surface);border:1px solid var(--bg-border);border-radius:10px;padding:12px;display:flex;gap:12px;align-items:center}
.cart-item-img{width:52px;height:52px;border-radius:7px;object-fit:cover;background:var(--bg-border);flex-shrink:0}
.cart-item-info{flex:1;min-width:0}
.cart-item-name{font-size:13px;font-weight:700;margin-bottom:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cart-item-price{font-size:12px;color:var(--primary);font-weight:700}
.qty-control{display:flex;align-items:center;gap:7px}
.qty-btn{width:26px;height:26px;border-radius:6px;background:var(--bg-card);border:1.5px solid var(--bg-border);color:var(--text-primary);font-size:15px;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .2s}
.qty-btn:hover{background:var(--primary);border-color:var(--primary);color:#fff}
.qty-num{font-size:13px;font-weight:700;min-width:18px;text-align:center}
.cart-empty{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--text-muted);gap:10px}
.cart-empty-icon{font-size:52px}
.cart-footer{padding:16px 20px;border-top:1px solid var(--bg-border)}
.cart-total-row{display:flex;justify-content:space-between;align-items:center;margin-bottom:13px}
.cart-total-label{font-size:13px;color:var(--text-secondary)}
.cart-total-value{font-size:20px;font-weight:900;color:var(--primary)}
.checkout-btn{width:100%;background:var(--primary);color:#fff;border:none;padding:13px;border-radius:8px;font-size:14px;font-weight:700;cursor:pointer;transition:all .2s}
.checkout-btn:hover{background:var(--primary-light);box-shadow:var(--shadow-purple)}
.checkout-summary{background:var(--bg-surface);border:1px solid var(--bg-border);border-radius:10px;padding:13px;margin-bottom:14px;max-height:200px;overflow-y:auto}
.checkout-summary-item{display:flex;justify-content:space-between;font-size:13px;padding:5px 0;border-bottom:1px solid var(--bg-border)}
.checkout-summary-item:last-child{border-bottom:none}
.checkout-total{display:flex;justify-content:space-between;font-size:15px;font-weight:800;margin-bottom:16px;padding:10px 0;border-top:1.5px solid var(--bg-border);border-bottom:1.5px solid var(--bg-border)}
.confirm-icon{width:70px;height:70px;border-radius:50%;background:var(--green-bg);border:2px solid var(--green-border);display:flex;align-items:center;justify-content:center;font-size:30px;margin:0 auto 18px}
.confirm-title{font-size:21px;font-weight:800;margin-bottom:6px}
.confirm-subtitle{color:var(--text-secondary);font-size:14px;margin-bottom:22px}
.order-id-box{background:var(--bg-surface);border:1px solid var(--bg-border);border-radius:10px;padding:14px;margin-bottom:18px}
.order-id-label{font-size:10px;color:var(--text-muted);margin-bottom:4px;font-weight:700;letter-spacing:.6px;text-transform:uppercase}
.order-id-value{font-family:'JetBrains Mono',monospace;font-size:20px;font-weight:700;color:var(--primary);letter-spacing:1px}

/* ADMIN LAYOUT */
.dash-layout{display:flex;min-height:100vh}
.sidebar{width:228px;background:var(--sidebar-bg);border-right:1px solid var(--bg-border);display:flex;flex-direction:column;position:fixed;top:0;left:0;bottom:0;z-index:200;transition:transform .3s,background .3s,border-color .3s;box-shadow:var(--shadow-sm)}

/* FIX #2: sidebar logo icon — no background */
.sidebar-logo{padding:16px 14px;border-bottom:1px solid var(--bg-border);display:flex;align-items:center;gap:10px}
.sidebar-logo-icon{width:34px;height:34px;border-radius:8px;background:transparent;display:flex;align-items:center;justify-content:center;font-size:17px;flex-shrink:0;overflow:hidden}
.sidebar-logo-icon img{width:auto;height:100%;max-width:100%;object-fit:contain;display:block}
.sidebar-logo-name{font-size:14px;font-weight:800;color:var(--primary);letter-spacing:-.3px;line-height:1.3}

.sb-label{padding:14px 14px 5px;font-size:10px;font-weight:800;letter-spacing:1.3px;text-transform:uppercase;color:var(--text-muted)}
.nav-item{display:flex;align-items:center;gap:10px;padding:9px 10px;margin:1px 7px;border-radius:8px;font-size:13px;font-weight:600;color:var(--text-secondary);cursor:pointer;transition:all .2s}
.nav-item:hover{background:var(--bg-surface);color:var(--text-primary)}
.nav-item.active{background:var(--primary-glow);color:var(--primary);font-weight:800}
.nav-icon{font-size:15px;width:19px;text-align:center;flex-shrink:0}
.sidebar-footer{margin-top:auto;padding:12px 14px;border-top:1px solid var(--bg-border);font-size:11px;color:var(--text-muted)}

.dash-main{flex:1;margin-left:228px;display:flex;flex-direction:column;min-height:100vh}
.topbar{background:var(--topbar-bg);border-bottom:1px solid var(--bg-border);padding:0 22px;height:60px;display:flex;align-items:center;gap:12px;position:sticky;top:0;z-index:100;box-shadow:var(--shadow-xs);transition:background .3s,border-color .3s}
.topbar-title{font-size:16px;font-weight:800;letter-spacing:-.3px;white-space:nowrap}
.topbar-search{flex:1;max-width:320px;position:relative}
.topbar-search input{width:100%;background:var(--bg-surface);border:1.5px solid var(--bg-border);border-radius:8px;padding:8px 14px 8px 34px;color:var(--text-primary);font-size:13px;outline:none;transition:all .2s}
.topbar-search input:focus{border-color:var(--primary);box-shadow:0 0 0 3px var(--primary-glow)}
.topbar-search .si{position:absolute;left:11px;top:50%;transform:translateY(-50%);color:var(--text-muted);font-size:14px;pointer-events:none}
.topbar-right{display:flex;align-items:center;gap:7px;margin-left:auto}
.tb-icon-btn{width:38px;height:38px;border-radius:9px;background:var(--bg-surface);border:1.5px solid var(--bg-border);display:flex;align-items:center;justify-content:center;font-size:16px;color:var(--text-secondary);cursor:pointer;position:relative;transition:all .2s}
.tb-icon-btn:hover{background:var(--primary-glow);color:var(--primary);border-color:var(--primary)}
.notif-badge{position:absolute;top:-4px;right:-4px;background:var(--red);color:#fff;width:17px;height:17px;border-radius:50%;font-size:10px;font-weight:800;display:flex;align-items:center;justify-content:center;border:2px solid var(--topbar-bg)}
.filter-group{display:flex;gap:6px}
.filter-btn{padding:6px 12px;border-radius:7px;border:1.5px solid var(--bg-border);background:var(--bg-surface);color:var(--text-secondary);font-size:12px;font-weight:600;cursor:pointer;transition:all .2s;white-space:nowrap}
.filter-btn:hover{border-color:var(--primary);color:var(--primary)}
.filter-btn.active{background:var(--primary);border-color:var(--primary);color:#fff}
.date-range-group{display:flex;align-items:center;gap:6px}
.date-range-group input[type="date"]{background:var(--bg-surface);border:1.5px solid var(--bg-border);border-radius:7px;padding:5px 9px;color:var(--text-primary);font-size:12px;outline:none;font-family:inherit;cursor:pointer}
.date-range-group input[type="date"]:focus{border-color:var(--primary)}

.dash-content{padding:22px;flex:1}
.dash-page{display:none}
.dash-page.active{display:block;animation:pgIn .25s ease}
@keyframes pgIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}

.welcome-bar{text-align:center;margin-bottom:20px}
.welcome-text{font-size:clamp(20px,3vw,30px);font-weight:900;color:var(--primary);letter-spacing:-.5px}
.welcome-sub{font-size:13px;color:var(--text-muted);margin-top:4px}

.stats-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:13px;margin-bottom:22px}
.stat-card{background:var(--bg-card);border:1.5px solid var(--bg-border);border-radius:14px;padding:17px;transition:all .25s;box-shadow:var(--shadow-xs)}
.stat-card:hover{transform:translateY(-2px);box-shadow:var(--shadow-sm)}
.stat-card.s-green{background:var(--green-bg);border-color:var(--green-border)}
.stat-card.s-red{background:var(--red-bg);border-color:var(--red-border)}
.stat-card.s-gray{background:var(--gray-bg);border-color:var(--gray-border)}
.stat-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:9px}
.stat-icon-box{width:34px;height:34px;border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:16px;background:var(--primary-glow)}
.s-green .stat-icon-box,.s-red .stat-icon-box,.s-gray .stat-icon-box{background:rgba(255,255,255,.4)}
.stat-value{font-size:24px;font-weight:900;letter-spacing:-.8px;color:var(--text-primary)}
.s-green .stat-value{color:var(--green)}.s-red .stat-value{color:var(--red)}.s-gray .stat-value{color:var(--gray)}
.stat-label{font-size:10px;font-weight:700;color:var(--text-muted);letter-spacing:.5px;text-transform:uppercase}
.s-green .stat-label{color:var(--green);opacity:.8}.s-red .stat-label{color:var(--red);opacity:.8}.s-gray .stat-label{color:var(--gray);opacity:.8}

.table-card{background:var(--bg-card);border:1.5px solid var(--bg-border);border-radius:14px;overflow:hidden;box-shadow:var(--shadow-xs);margin-bottom:18px}
.table-card-header{padding:14px 18px;border-bottom:1px solid var(--bg-border);display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.table-card-title{font-size:14px;font-weight:800}
.table-scroll{overflow-x:auto}
.data-table{width:100%;border-collapse:collapse}
.data-table th{padding:10px 14px;font-size:10px;font-weight:700;color:var(--text-muted);letter-spacing:.8px;text-transform:uppercase;text-align:left;border-bottom:1px solid var(--bg-border);background:var(--bg-surface);white-space:nowrap}
.data-table td{padding:12px 14px;font-size:13px;border-bottom:1px solid var(--bg-border);vertical-align:middle}
.data-table tr:last-child td{border-bottom:none}
.data-table tbody tr{cursor:pointer;transition:background .15s}
.data-table tbody tr:hover{background:var(--bg-surface)}
.order-id-mono{font-family:'JetBrains Mono',monospace;font-size:11px;font-weight:600;color:var(--primary)}
.status-select{background:var(--bg-surface);border:1.5px solid var(--bg-border);border-radius:7px;padding:5px 9px;color:var(--text-primary);font-size:12px;font-weight:600;cursor:pointer;outline:none;transition:all .2s}
.status-select:focus{border-color:var(--primary)}

.dishes-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(205px,1fr));gap:15px}
.admin-dish-card{background:var(--bg-card);border:1.5px solid var(--bg-border);border-radius:13px;overflow:hidden;transition:all .25s;box-shadow:var(--shadow-xs)}
.admin-dish-card:hover{transform:translateY(-2px)}
.admin-dish-img{width:100%;height:125px;object-fit:cover;background:var(--bg-surface)}
.admin-dish-img-ph{width:100%;height:125px;background:var(--bg-surface);display:flex;align-items:center;justify-content:center;font-size:38px}
.admin-dish-body{padding:12px}
.admin-dish-name{font-size:13px;font-weight:800;margin-bottom:3px}
.admin-dish-price{font-size:15px;font-weight:900;color:var(--primary);margin-bottom:9px}
.admin-dish-actions{display:flex;gap:7px}
.action-btn{flex:1;padding:6px;border-radius:7px;font-size:12px;font-weight:700;cursor:pointer;transition:all .2s;border:1.5px solid;text-align:center}
.action-btn.edit{background:var(--blue-bg);border-color:var(--blue-border);color:var(--blue)}
.action-btn.edit:hover{background:var(--blue);color:#fff}
.action-btn.delete{background:var(--red-bg);border-color:var(--red-border);color:var(--red)}
.action-btn.delete:hover{background:var(--red);color:#fff}

.settings-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:16px}
.settings-card{background:var(--bg-card);border:1.5px solid var(--bg-border);border-radius:14px;padding:20px;box-shadow:var(--shadow-xs)}
.settings-card-title{font-size:14px;font-weight:800;margin-bottom:16px;padding-bottom:11px;border-bottom:1px solid var(--bg-border)}

/* FIX #2: logo preview no background */
.logo-preview-wrap{display:flex;align-items:center;gap:12px;padding:12px;background:var(--bg-surface);border:1.5px solid var(--bg-border);border-radius:9px;margin-bottom:12px}
.logo-preview-img{width:52px;height:52px;border-radius:9px;background:transparent;display:flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden;font-size:24px}
.logo-preview-img img{width:auto;height:100%;max-width:100%;object-fit:contain}

.banner-preview-box{width:100%;height:90px;border-radius:9px;background:var(--bg-surface);border:1.5px solid var(--bg-border);margin-bottom:11px;overflow:hidden;display:flex;align-items:center;justify-content:center;color:var(--text-muted);font-size:12px}
.banner-preview-box img{width:100%;height:100%;object-fit:cover}

/* NOTIFICATION */
.notif-wrap{position:relative}
.notif-dropdown{position:absolute;top:calc(100% + 8px);right:0;width:300px;background:var(--bg-card);border:1.5px solid var(--bg-border);border-radius:14px;box-shadow:var(--shadow-lg);z-index:999;overflow:hidden;animation:pgIn .2s ease}
.notif-header{padding:12px 14px;border-bottom:1px solid var(--bg-border);display:flex;align-items:center;justify-content:space-between}
.notif-header span{font-size:13px;font-weight:800}
.notif-list{max-height:300px;overflow-y:auto}
.notif-item{padding:12px 14px;border-bottom:1px solid var(--bg-border);cursor:pointer;transition:background .15s;display:flex;gap:11px;align-items:flex-start}
.notif-item:last-child{border-bottom:none}
.notif-item:hover{background:var(--bg-surface)}
.notif-item.unread{background:var(--primary-glow)}
.notif-dot{width:7px;height:7px;border-radius:50%;background:var(--primary);flex-shrink:0;margin-top:5px}
.notif-item-title{font-size:12px;font-weight:700;margin-bottom:2px}
.notif-item-sub{font-size:11px;color:var(--text-muted)}
.notif-empty{padding:28px;text-align:center;color:var(--text-muted);font-size:12px}

/* ORDER DETAIL */
.order-detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:11px;margin-bottom:16px}
.order-detail-row{padding:10px 13px;background:var(--bg-surface);border-radius:9px}
.order-detail-label{font-size:10px;font-weight:800;letter-spacing:.8px;text-transform:uppercase;color:var(--text-muted);margin-bottom:3px}
.order-detail-value{font-size:13px;font-weight:600}
.invoice-table{width:100%;border-collapse:collapse;margin-bottom:12px}
.invoice-table th{padding:8px 11px;font-size:10px;font-weight:700;color:var(--text-muted);letter-spacing:.5px;text-transform:uppercase;background:var(--bg-surface);text-align:left;border-bottom:1px solid var(--bg-border)}
.invoice-table td{padding:9px 11px;font-size:13px;border-bottom:1px solid var(--bg-border)}
.invoice-table tr:last-child td{border-bottom:none}
.invoice-totals{background:var(--bg-surface);border-radius:9px;padding:11px 13px}
.invoice-row{display:flex;justify-content:space-between;font-size:13px;padding:4px 0;border-bottom:1px solid var(--bg-border)}
.invoice-row:last-child{border-bottom:none;font-size:14px;font-weight:900;color:var(--primary)}
.print-btn{display:flex;align-items:center;gap:7px;background:var(--primary-glow);border:1.5px solid var(--primary);color:var(--primary);padding:9px 16px;border-radius:8px;font-size:13px;font-weight:700;cursor:pointer;transition:all .2s}
.print-btn:hover{background:var(--primary);color:#fff}

/* ============================================
   CATEGORY ROW (FIX #1)
   ============================================ */
.category-row {
  display:flex;align-items:center;justify-content:space-between;
  padding:12px 16px;background:var(--bg-surface);
  border:1.5px solid var(--bg-border);border-radius:10px;margin-bottom:8px;
}
.category-row-name{font-size:14px;font-weight:700;display:flex;align-items:center;gap:8px}
.category-row-actions{display:flex;gap:8px}

/* ============================================
   COLOR SWATCH ROW (FIX #4 & #5)
   ============================================ */
.color-row {
  display:flex;align-items:center;gap:12px;margin-bottom:14px;
}
.color-row label {
  font-size:12px;font-weight:700;color:var(--text-secondary);
  letter-spacing:.4px;text-transform:uppercase;min-width:160px;flex-shrink:0;
}
.color-row input[type="color"] {
  width:44px;height:36px;border-radius:7px;
  border:1.5px solid var(--bg-border);cursor:pointer;
  padding:2px;background:var(--bg-surface);
}
.color-row input[type="text"] {
  flex:1;background:var(--bg-surface);border:1.5px solid var(--bg-border);
  border-radius:7px;padding:7px 12px;color:var(--text-primary);
  font-size:13px;outline:none;transition:all .2s;
  font-family:'JetBrains Mono',monospace;
}
.color-row input[type="text"]:focus{border-color:var(--primary)}

/* Customer theme editor (dashboard) */
.theme-group{
  border:1.5px solid var(--bg-border);border-radius:10px;margin-bottom:10px;
  background:var(--bg-surface);overflow:hidden;
}
.theme-group summary{
  padding:12px 14px;font-size:13px;font-weight:800;cursor:pointer;
  list-style:none;display:flex;align-items:center;justify-content:space-between;
}
.theme-group summary::-webkit-details-marker{display:none}
.theme-group summary::after{content:"+";font-size:16px;color:var(--text-muted);font-weight:700}
.theme-group[open] summary::after{content:"−"}
.theme-group-body{padding:0 14px 14px}
.theme-token-row{margin-bottom:12px}
.theme-token-row > label{display:block;font-size:11px;font-weight:800;letter-spacing:.4px;text-transform:uppercase;color:var(--text-muted);margin-bottom:8px}
.theme-mode-pair{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.theme-mode-col .theme-mode-label{display:block;font-size:10px;font-weight:700;color:var(--text-muted);margin-bottom:6px;text-transform:uppercase;letter-spacing:.5px}
.theme-mode-col .color-row{margin:0}
.dish-flag-btn{
  width:34px;height:34px;border-radius:8px;border:1.5px solid var(--bg-border);
  background:var(--bg-card);font-size:16px;line-height:1;cursor:pointer;
  transition:all .15s;color:var(--text-muted);
}
.dish-flag-btn:hover{border-color:var(--primary);color:var(--primary)}
.dish-flag-btn.active{background:var(--primary-glow);border-color:var(--primary);color:var(--primary)}
.dish-flag-btn.active-deal{color:var(--yellow);border-color:var(--yellow-border);background:var(--yellow-bg)}
.dish-flag-btn.active-featured{color:var(--primary);border-color:var(--primary);background:var(--primary-glow)}

/* MOBILE SIDEBAR */
.sidebar-toggle{display:none;position:fixed;top:11px;left:11px;z-index:300;background:var(--primary);color:#fff;border:none;width:38px;height:38px;border-radius:9px;font-size:17px;align-items:center;justify-content:center;cursor:pointer}

/* THERMAL PRINT RECEIPT */
#print-area{display:none}
#print-area.print-active{display:block;position:fixed;left:-9999px;top:0;width:80mm;max-width:80mm;background:#fff;color:#000;padding:4mm 3mm;font-family:'DM Sans',system-ui,sans-serif;font-size:11px;line-height:1.35}
.pr-header{text-align:center;border-bottom:2px dashed #000;padding-bottom:10px;margin-bottom:10px}
.pr-logo-wrap{margin-bottom:6px}
.pr-logo{max-height:42px;max-width:100%;object-fit:contain}
.pr-name{font-size:16px;font-weight:900;line-height:1.2}
.pr-addr{font-size:10px;color:#333;margin-top:2px}
.pr-divider{border:none;border-top:1px dashed #999;margin:8px 0}
.pr-row{display:flex;justify-content:space-between;gap:8px;padding:2px 0;font-size:11px}
.pr-row span:last-child{text-align:right;max-width:55%}
.pr-row.bold{font-weight:700}
.pr-row.total-row{font-size:13px;font-weight:900;border-top:2px dashed #000;margin-top:6px;padding-top:6px}
.pr-items-head{display:flex;justify-content:space-between;gap:6px;font-size:9px;font-weight:700;text-transform:uppercase;color:#444;border-bottom:1px solid #ccc;padding-bottom:3px;margin-bottom:4px}
.pr-items-head span:nth-child(1){flex:1}
.pr-items-head span:nth-child(2){width:28px;text-align:center}
.pr-items-head span:nth-child(3){width:52px;text-align:right}
.pr-item{display:flex;justify-content:space-between;gap:6px;padding:2px 0;font-size:11px;align-items:flex-start}
.pr-item span:nth-child(1){flex:1;min-width:0}
.pr-item span:nth-child(2){width:28px;text-align:center;flex-shrink:0}
.pr-item span:nth-child(3){width:52px;text-align:right;flex-shrink:0}
.pr-footer{text-align:center;margin-top:12px;padding-top:8px;border-top:1px dashed #999;font-size:10px;color:#444}
@media print {
  body *{visibility:hidden !important}
  #print-area,#print-area *{visibility:visible !important}
  #print-area{
    display:block !important;position:absolute;left:0;top:0;right:auto;bottom:auto;
    width:80mm;max-width:80mm;margin:0 auto;
    background:#fff !important;color:#000 !important;
    padding:3mm 2.5mm !important;
    font-family:'DM Sans',system-ui,sans-serif !important;font-size:11px !important;
    box-shadow:none !important;
  }
  @page{margin:2mm;size:80mm auto}
}

/* ============================================
   RESPONSIVE — DASHBOARD (FIX #3)
   Mobile: 320–480px  |  Tablet: 768–1024px
   ============================================ */

/* ── Tablet: 1024px and below ── */
@media (max-width:1024px) {
  .sidebar { width:200px; }
  .dash-main { margin-left:200px; }
  .stats-grid { grid-template-columns:repeat(3,1fr); }
  .settings-grid { grid-template-columns:1fr 1fr; }
}

/* ── Tablet narrow / large mobile: 900px and below ── */
@media (max-width:900px) {
  /* Sidebar becomes off-canvas drawer */
  .sidebar {
    width:240px;
    transform:translateX(-100%);
    z-index:300;
    box-shadow:none;
  }
  .sidebar.open {
    transform:translateX(0);
    box-shadow:var(--shadow-lg);
  }
  /* Backdrop is rendered as a real <div id="sidebar-backdrop"> so JS can
     reliably show/hide it. The legacy ::before overlay was removed because
     it sometimes lingered when the sidebar closed via a non-click path. */
  .sidebar-toggle { display:flex; }
  .dash-main { margin-left:0; }
  .topbar { padding:0 12px 0 58px; gap:8px; }
  .topbar-title { font-size:14px; }
  .dash-content { padding:14px; }

  /* Stats: 2-column on tablet */
  .stats-grid { grid-template-columns:repeat(2,1fr); gap:10px; }

  /* Order detail grid: single column */
  .order-detail-grid { grid-template-columns:1fr; }

  /* Hide time filter buttons — too cramped; search stays */
  .filter-group { display:none; }
  .date-range-group { display:none; }

  /* Settings: stack to single column */
  .settings-grid { grid-template-columns:1fr; }

  /* Category theme color grid: stack */
  .settings-grid [style*="grid-column:1/-1"] { grid-column:1; }
}

/* ── Mobile: 768px and below (menu grid spacing only) ── */
@media (max-width:768px) {
  .menu-section .section,
  .home-carousel-section .section,
  .customer-search-section .section,
  #category-menu-sections .category-menu-block .section{
    padding-left:4px;padding-right:4px;
  }
  .menu-grid{
    gap:8px;
    grid-template-columns:repeat(2,1fr);
  }
}

/* ── Mobile: 640px and below ── */
@media (max-width:640px) {
  /* Customer header */
  .header-left { display:none; }
  .site-header .logo-img-box { height:40px; max-height:40px; max-width:min(160px,50vw); }
  .floating-cart-btn{
    bottom:11px;padding:8px 14px;font-size:12px;gap:6px;
  }
  .floating-cart-btn > span:first-child{font-size:15px}
  .footer-bottom { grid-template-columns:1fr; text-align:center; }
  .footer-bottom-left, .footer-bottom-right { justify-self:center; text-align:center; }
  .footer-credit { justify-self:center; order:-1; margin-bottom:4px; }

  .footer-inner { grid-template-columns:1fr; }

  /* Toast position */
  #toast-container { bottom:80px; right:12px; left:12px; }
  .toast { min-width:unset; max-width:100%; }

  /* Dashboard topbar */
  .topbar { height:auto; min-height:56px; padding:8px 12px 8px 54px; flex-wrap:wrap; gap:6px; }
  .topbar-title { font-size:13px; }
  #topbar-search-wrap { max-width:100%; flex:1 1 100%; order:10; }
  #topbar-search-wrap input { font-size:12px; }
  .topbar-right { gap:5px; }

  /* Profile button: hide label on small screens */
  .profile-btn-name { display:none; }

  /* Stats: 2 cols */
  .stats-grid { grid-template-columns:1fr 1fr; gap:8px; }
  .stat-value { font-size:20px; }

  /* Table cards: horizontal scroll with touch scrolling */
  .table-scroll {
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
  }
  /* Give data tables minimum comfortable width */
  #orders-tbody .data-table,
  .data-table { min-width:520px; }

  /* Recent orders table */
  #recent-orders-body .data-table { min-width:460px; }

  /* Order detail modal: full width */
  .modal { border-radius:14px; padding:20px; }
  .modal.modal-lg { max-width:100%; }
  .order-detail-grid { grid-template-columns:1fr; gap:8px; }

  /* Dish cards in admin: 2 col grid */
  .dishes-grid { grid-template-columns:1fr 1fr; gap:10px; }

  /* Settings stack */
  .settings-grid { grid-template-columns:1fr; }

  /* Color row on mobile: wrap label above controls */
  .color-row { flex-wrap:wrap; gap:8px; }
  .color-row label { min-width:100%; font-size:10px; }

  /* Sidebar footer */
  .sidebar-footer { font-size:10px; }

  /* Welcome text */
  .welcome-text { font-size:18px; }
}

/* ── Small mobile: 480px and below ── */
@media (max-width:480px) {
  .stats-grid { grid-template-columns:1fr 1fr; gap:8px; }
  .stat-card { padding:12px; }
  .stat-value { font-size:18px; letter-spacing:-.5px; }
  .stat-label { font-size:9px; }

  .table-card-header { flex-direction:column; align-items:flex-start; gap:8px; }
  .table-card-title { font-size:13px; }

  /* Admin dish cards: stack to 1 col */
  .dishes-grid { grid-template-columns:1fr; }

  /* Action buttons in dishes */
  .admin-dish-actions { flex-direction:row; }
  .action-btn { font-size:11px; padding:6px 8px; }

  /* Topbar profile */
  .profile-btn { padding:5px 8px 5px 5px; }
  .profile-avatar { width:26px; height:26px; font-size:12px; }

  /* Category rows */
  .category-row { flex-direction:column; align-items:flex-start; gap:8px; }
  .category-row-actions { width:100%; display:flex; }
  .category-row-actions .action-btn { flex:1; text-align:center; }
}

/* ── Very small: 360px and below ── */
@media (max-width:360px) {
  .stats-grid { grid-template-columns:1fr; }
  .menu-grid { grid-template-columns:1fr; }
  .topbar { padding-left:50px; }
}

/* ── Touch device: ensure tap targets are large enough ── */
@media (hover:none) and (pointer:coarse) {
  .nav-item { padding:12px 10px; }
  .filter-btn { padding:9px 14px; }
  .status-pill { padding:8px 13px; font-size:13px; }
  .status-drop-item { padding:12px 14px; }
  .action-btn { padding:9px 10px; }
  .qty-btn { width:32px; height:32px; }
  .add-btn { width:40px; height:40px; font-size:24px; }
  .cart-btn { padding:10px 18px; }
}

/* ============================================
   v4 ADDITIONS
   ============================================ */

/* --- RECENT NOTE TAG (FIX #2) --- */
.recent-note-tag {
  display:inline-flex; align-items:center; gap:4px;
  font-size:10px; color:var(--yellow); font-weight:600;
  margin-top:3px; cursor:default;
}
.recent-note-text {
  color:var(--text-muted); font-weight:500; font-style:italic;
}

/* --- STATUS PILL (clickable, color-coded) --- */
.status-pill-wrap { position:relative; display:inline-block; }
.status-pill {
  display:inline-flex; align-items:center; gap:5px;
  padding:5px 11px; border-radius:8px;
  font-size:12px; font-weight:700; cursor:pointer;
  border:1.5px solid transparent; transition:all .15s;
  white-space:nowrap; user-select:none;
}
.status-pill .sp-arrow { font-size:9px; opacity:.7; }
.status-pill:hover { filter:brightness(1.08); }

/* Color variants */
.status-pill-green  { background:var(--green-bg);  color:var(--green);  border-color:var(--green-border); }
.status-pill-red    { background:var(--red-bg);    color:var(--red);    border-color:var(--red-border); }
.status-pill-yellow { background:var(--yellow-bg); color:var(--yellow); border-color:var(--yellow-border); }
.status-pill-gray   { background:var(--gray-bg);   color:var(--gray);   border-color:var(--gray-border); }
.status-pill-blue   { background:var(--blue-bg);   color:var(--blue);   border-color:var(--blue-border); }
.status-pill-purple { background:var(--purple-bg); color:var(--purple); border-color:var(--purple-border); }

/* Status dropdown */
.status-dropdown {
  position:absolute; top:calc(100% + 5px); left:0;
  background:var(--bg-card); border:1.5px solid var(--bg-border);
  border-radius:10px; box-shadow:var(--shadow-lg);
  z-index:500; min-width:150px; overflow:hidden;
  animation:slideInR .15s ease;
}
.status-drop-item {
  display:flex; align-items:center; gap:9px;
  padding:9px 13px; font-size:13px; font-weight:600;
  cursor:pointer; transition:background .12s;
}
.status-drop-item:hover { background:var(--bg-surface); }
.status-drop-item.active { font-weight:800; color:var(--primary); }

/* Status dot indicators in dropdown */
.sdrop-dot { width:9px; height:9px; border-radius:50%; flex-shrink:0; }
.sdot-pending     { background:var(--gray); }
.sdot-preparing   { background:var(--yellow); }
.sdot-ready       { background:var(--blue); }
.sdot-on-the-way  { background:var(--purple); }
.sdot-delivered   { background:var(--green); }
.sdot-cancelled   { background:var(--red); }

/* --- Staff & Access list (reuses category-row look) --- */
.staff-row { display:flex; align-items:center; gap:12px; padding:11px 13px; background:var(--bg-card);
  border:1.5px solid var(--bg-border); border-radius:10px; margin-bottom:8px; }
.staff-row-info { flex:1; min-width:0; }
.staff-row-name { font-weight:800; font-size:13px; color:var(--text-primary); margin-bottom:2px; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.staff-row-meta { font-size:11px; color:var(--text-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.staff-row-actions { display:flex; gap:6px; flex-shrink:0; }
.staff-role-badge { font-size:10px; font-weight:800; letter-spacing:.5px; text-transform:uppercase; padding:3px 8px; border-radius:6px; border:1px solid; }
.staff-role-admin { background:var(--purple-bg); color:var(--purple); border-color:var(--purple-border); }
.staff-role-chef  { background:var(--yellow-bg); color:var(--yellow); border-color:var(--yellow-border); }
.staff-role-rider { background:var(--blue-bg);   color:var(--blue);   border-color:var(--blue-border); }
.staff-inactive   { opacity:.55; }

/* Hide nav items the current role isn't allowed to see */
.role-hide { display:none !important; }

/* --- Sidebar collapse (desktop / tablet ≥901px) --- */
.sidebar-logo { position:relative; }
.sidebar-collapse-btn {
  background:transparent; border:1.5px solid var(--bg-border); color:var(--text-secondary);
  border-radius:8px; width:28px; height:28px; cursor:pointer; flex-shrink:0;
  display:flex; align-items:center; justify-content:center; font-size:14px; font-weight:700;
  transition:all .2s; margin-left:auto;
}
.sidebar-collapse-btn:hover { border-color:var(--primary); color:var(--primary); }

@media (min-width:901px) {
  body.sidebar-collapsed .sidebar { width:64px; }
  body.sidebar-collapsed .dash-main { margin-left:64px; }
  body.sidebar-collapsed .sidebar-logo { padding:14px 8px; justify-content:center; }
  body.sidebar-collapsed .sidebar-logo-name { display:none; }
  body.sidebar-collapsed .sidebar-collapse-btn { margin:0; }
  body.sidebar-collapsed .sb-label { font-size:0 !important; padding:10px 0 4px; text-align:center; }
  body.sidebar-collapsed .sb-label::after { content:"\2022"; font-size:10px; color:var(--text-muted); letter-spacing:0; }
  body.sidebar-collapsed .nav-item { font-size:0; padding:10px 0; margin:1px 8px; justify-content:center; }
  body.sidebar-collapsed .nav-item .nav-icon { font-size:16px; width:auto; }
  body.sidebar-collapsed .sidebar-footer { font-size:0 !important; padding:10px 0; text-align:center; }
  body.sidebar-collapsed .sidebar [data-role-only] { display:none !important; }
}

/* On mobile/tablet drawer mode the collapse button is irrelevant */
@media (max-width:900px) {
  .sidebar-collapse-btn { display:none; }
}

/* --- Toggle switch (pure CSS, uses :checked) --- */
.dp-switch { position:relative; display:inline-block; width:46px; height:24px; flex-shrink:0; cursor:pointer; }
.dp-switch input { position:absolute; opacity:0; width:0; height:0; pointer-events:none; }
.dp-switch-track { position:absolute; inset:0; background:var(--bg-border); border-radius:24px; transition:background .2s; }
.dp-switch-knob  { position:absolute; top:2px; left:2px; width:20px; height:20px; background:#fff; border-radius:50%; transition:transform .2s; box-shadow:0 1px 3px rgba(0,0,0,.2); }
.dp-switch input:checked ~ .dp-switch-track { background:var(--primary); }
.dp-switch input:checked ~ .dp-switch-track .dp-switch-knob { transform:translateX(22px); }
.dp-switch input:focus-visible ~ .dp-switch-track { box-shadow:0 0 0 3px var(--primary-glow); }

/* --- PROFILE DROPDOWN (v4 #8) --- */
.profile-wrap { position:relative; }
.profile-btn {
  display:flex; align-items:center; gap:8px;
  padding:6px 10px 6px 6px; border-radius:10px;
  background:var(--bg-surface); border:1.5px solid var(--bg-border);
  cursor:pointer; transition:all .2s;
}
.profile-btn:hover { border-color:var(--primary); background:var(--primary-glow); }
.profile-avatar {
  width:30px; height:30px; border-radius:8px;
  background:var(--primary); display:flex; align-items:center;
  justify-content:center; font-size:14px; color:#fff; overflow:hidden;
  flex-shrink:0;
}
.profile-avatar img { width:100%; height:100%; object-fit:contain; }
.profile-btn-name {
  font-size:12px; font-weight:700; color:var(--text-primary);
  max-width:100px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}

.profile-dropdown {
  position:absolute; top:calc(100% + 8px); right:0;
  width:230px; background:var(--bg-card);
  border:1.5px solid var(--bg-border); border-radius:14px;
  box-shadow:var(--shadow-lg); z-index:999; overflow:hidden;
  animation:pgIn .2s ease;
}
.profile-header {
  padding:18px 16px; display:flex; flex-direction:column; align-items:center; gap:10px;
  border-bottom:1px solid var(--bg-border); text-align:center;
}
.profile-logo {
  width:56px; height:56px; border-radius:12px;
  background:var(--primary); display:flex; align-items:center;
  justify-content:center; font-size:26px; overflow:hidden;
}
.profile-logo img { width:100%; height:100%; object-fit:contain; }
.profile-restname { font-size:14px; font-weight:800; color:var(--text-primary); }
.profile-greeting { font-size:12px; color:var(--text-muted); }
.profile-signout {
  display:flex; align-items:center; gap:8px;
  width:100%; padding:13px 16px;
  font-size:13px; font-weight:700; color:var(--red);
  cursor:pointer; transition:background .15s;
  border:none; background:none; font-family:inherit;
}
.profile-signout:hover { background:var(--red-bg); }

/* --- MOBILE HEADER (v4 #5) --- */
/* Logo-only header; name not shown in site header */

/* --- CATEGORY ROW (already exists, reinforce) --- */
.category-row {
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 16px; background:var(--bg-surface);
  border:1.5px solid var(--bg-border); border-radius:10px; margin-bottom:8px;
}
.category-row-name { font-size:14px; font-weight:700; display:flex; align-items:center; gap:8px; }
.category-row-actions { display:flex; gap:8px; }

/* Orders table: 8 columns now (+ Note preview col removed — embedded in Items cell) */
/* Ensure orders table has right column count */
#orders-tbody td:nth-child(7) { white-space:nowrap; }

/* ============================================
   MOBILE BOTTOM NAVIGATION BAR (FIX #3)
   Visible only on screens ≤ 640px
   ============================================ */
#mobile-bottom-nav {
  display:none;
  position:fixed;
  bottom:0; left:0; right:0;
  height:60px;
  background:var(--bg-card);
  border-top:1px solid var(--bg-border);
  z-index:250;
  flex-direction:row;
  align-items:stretch;
  box-shadow:0 -2px 12px rgba(0,0,0,.08);
}

.mbn-item {
  flex:1;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:2px;
  background:none;
  border:none;
  cursor:pointer;
  padding:6px 4px;
  color:var(--text-muted);
  transition:color .2s;
  font-family:inherit;
  -webkit-tap-highlight-color:transparent;
}
.mbn-item.active { color:var(--primary); }
.mbn-item:hover  { color:var(--primary-light); }
.mbn-icon { font-size:18px; line-height:1; }
.mbn-label { font-size:9px; font-weight:700; letter-spacing:.3px; text-transform:uppercase; }

@media (max-width:640px) {
  #mobile-bottom-nav { display:flex; }
  /* Push dashboard content above the bottom nav */
  .dash-content { padding-bottom:72px !important; }
  /* On very small screens, topbar is thinner */
  .topbar { min-height:52px; }
}

/* --- Dish discount display (customer) --- */
.dish-price-wrap { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.price-original { font-size:13px; color:var(--text-muted); text-decoration:line-through; font-weight:600; }
.discount-badge {
  font-size:10px; font-weight:800; letter-spacing:.4px; text-transform:uppercase;
  padding:3px 7px; border-radius:6px; background:var(--red-bg); color:var(--red); border:1px solid var(--red-border);
}

/* --- Option chips (sizes / flavors) --- */
.opt-chips { display:flex; flex-wrap:wrap; gap:8px; }
.opt-chip {
  padding:8px 14px; border-radius:10px; border:1.5px solid var(--bg-border);
  background:var(--bg-surface); font-size:13px; font-weight:700; color:var(--text-secondary);
  cursor:pointer; transition:all .15s; user-select:none;
}
.opt-chip:hover { border-color:var(--primary); color:var(--primary); }
.opt-chip.active { background:var(--primary-glow); border-color:var(--primary); color:var(--primary); }
.opt-chip-sub { display:block; font-size:10px; font-weight:600; color:var(--text-muted); margin-top:2px; }

/* --- Progressive disclosure (dish forms) --- */
.discount-panel {
  margin-top:10px; padding:12px; border-radius:10px;
  border:1.5px solid var(--bg-border); background:var(--bg-surface);
}
.preset-options-hint { font-size:11px; color:var(--text-muted); margin-bottom:8px; line-height:1.4; }

/* --- Customize bottom sheet (customer) --- */
.customize-overlay {
  position:fixed; inset:0; z-index:600; background:rgba(0,0,0,.45);
  opacity:0; visibility:hidden; transition:opacity .25s, visibility .25s;
  backdrop-filter:blur(2px);
}
.customize-overlay.active { opacity:1; visibility:visible; }
.customize-sheet {
  position:fixed; left:0; right:0; bottom:0; z-index:601;
  max-height:88vh; background:var(--bg-card); border-radius:20px 20px 0 0;
  box-shadow:0 -8px 40px rgba(0,0,0,.18); transform:translateY(100%);
  transition:transform .32s cubic-bezier(.32,.72,.24,1);
  display:flex; flex-direction:column; overflow:hidden;
}
.customize-overlay.active .customize-sheet { transform:translateY(0); }
.customize-handle {
  width:40px; height:4px; border-radius:4px; background:var(--bg-border);
  margin:10px auto 0; flex-shrink:0;
}
.customize-scroll { overflow-y:auto; padding:16px 18px 0; flex:1; }
.customize-img {
  width:100%; height:180px; object-fit:cover; border-radius:14px;
  margin-bottom:14px; background:var(--bg-surface);
}
.customize-img-ph {
  width:100%; height:140px; border-radius:14px; background:var(--bg-surface);
  display:flex; align-items:center; justify-content:center; font-size:48px; margin-bottom:14px;
}
.customize-title { font-size:20px; font-weight:900; letter-spacing:-.4px; margin-bottom:6px; }
.customize-desc { font-size:13px; color:var(--text-secondary); line-height:1.5; margin-bottom:14px; }
.customize-price-row { display:flex; align-items:center; gap:10px; margin-bottom:16px; flex-wrap:wrap; }
.customize-price { font-size:22px; font-weight:900; color:var(--primary); }
.customize-section-label {
  font-size:11px; font-weight:800; letter-spacing:.6px; text-transform:uppercase;
  color:var(--text-muted); margin-bottom:8px;
}
.customize-section { margin-bottom:16px; }
.customize-footer {
  padding:14px 18px 18px; border-top:1px solid var(--bg-border);
  background:var(--bg-card); flex-shrink:0;
}
.customize-qty-row {
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom:12px;
}
.customize-qty-row .qty-control { margin:0; }
.customize-close { display:none; }
.customize-inner { display:flex; flex-direction:column; }
.customize-panel-main { min-width:0; }
.customize-panel-media { min-width:0; }
.customize-desktop-actions { display:none; }

@media (min-width:769px) {
  .customize-overlay {
    display:flex; align-items:center; justify-content:center;
    padding:20px;
  }
  .customize-sheet {
    position:relative; left:auto; right:auto; bottom:auto; top:auto;
    width:100%; max-width:900px; max-height:90vh;
    border-radius:20px; transform:translateY(16px) scale(.97);
    transition:transform .32s cubic-bezier(.32,.72,.24,1), opacity .25s;
  }
  .customize-overlay.active .customize-sheet { transform:translateY(0) scale(1); }
  .customize-handle { display:none; }
  .customize-close {
    display:flex; position:absolute; top:14px; right:14px; z-index:3;
  }
  .customize-scroll {
    padding:24px 24px 0; overflow:visible; flex:1;
  }
  .customize-inner {
    display:grid; grid-template-columns:1fr 1fr; gap:24px; align-items:start;
  }
  .customize-panel-media { grid-column:1; grid-row:1; padding:16px; }
  .customize-panel-main { grid-column:2; grid-row:1; }
  .customize-panel-media .customize-img,
  .customize-panel-media .customize-img-ph {
    height:100%; min-height:280px; max-height:420px; margin-bottom:0;
    width:100%; box-sizing:border-box;
  }
  .customize-footer { display:none; }
  .customize-desktop-actions {
    display:block; margin-top:8px;
  }
  .customize-desktop-actions .customize-qty-row { margin-bottom:12px; }
  .customize-desktop-actions .checkout-btn { width:100%; }
}

/* Cart / order item variant lines */
.cart-item-variant, .order-item-variant {
  font-size:11px; color:var(--text-muted); font-weight:600; margin-top:2px; line-height:1.35;
}
