/* RESTO V9 — common design shell only. No changes to business panels/data. */
@media(min-width:901px){
 body.resto-unified-v9 .app-shell,body.resto-unified-v9 .shell{display:flex!important;width:100%!important;max-width:none!important;min-height:100vh!important;margin:0!important;overflow:visible!important}
 body.resto-unified-v9 .sidebar,body.resto-unified-v9 .side{position:sticky!important;top:0!important;left:0!important;flex:0 0 216px!important;width:216px!important;min-width:216px!important;max-width:216px!important;height:100vh!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;z-index:25!important}
 body.resto-unified-v9 .main-wrap,body.resto-unified-v9 .content,body.resto-unified-v9 .workspace,body.resto-unified-v9 .page{flex:1 1 0!important;min-width:0!important;width:calc(100% - 216px)!important;margin-left:0!important;margin-right:0!important;max-width:none!important;padding:12px 16px 25px!important;overflow:visible!important}
 body.resto-unified-v9 .main-wrap>.topbar,body.resto-unified-v9 .content>.header,body.resto-unified-v9 .workspace>.top,body.resto-unified-v9 .page>.topbar{margin:0 0 12px!important;min-height:54px!important;padding:0 0 10px!important;gap:12px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;max-width:100%!important}
 body.resto-unified-v9 .main-wrap>main,body.resto-unified-v9 .content>main,body.resto-unified-v9 .workspace>main,body.resto-unified-v9 .page>main{max-width:none!important;min-width:0!important;padding:0!important;margin:0!important}
}
body.resto-unified-v9 .sidebar,body.resto-unified-v9 .side{background:linear-gradient(170deg,#170b05 0%,#070709 23%,#070707 69%,#150c07 100%)!important;border-right:1px solid #342116!important;scrollbar-width:thin;scrollbar-color:#604027 transparent}
body.resto-unified-v9 .resto-unified-brand{height:83px!important;min-height:83px!important;padding:12px 12px!important;margin:0!important;display:flex!important;align-items:center!important;gap:12px!important;color:white!important;text-decoration:none!important;border-bottom:1px solid #372216!important;background:linear-gradient(105deg,#120b08,#21120a)!important;position:relative!important;width:100%!important}
body.resto-unified-v9 .resto-unified-brand:after{content:'';position:absolute;bottom:0;right:0;width:96px;height:25px;border-bottom:2px solid #ff8c0a;border-radius:0 0 100% 0;pointer-events:none}
body.resto-unified-v9 .resto-brand-mark{width:50px!important;height:50px!important;min-width:50px!important;display:grid!important;place-items:center!important;border:2px solid #bd770e!important;border-radius:12px!important;color:#ffa01b!important;background:#100e0c!important}
body.resto-unified-v9 .resto-brand-mark svg{width:37px!important;height:38px!important;filter:none!important}
body.resto-unified-v9 .resto-brand-type{min-width:0!important;display:flex!important;flex-direction:column!important;gap:4px!important}
body.resto-unified-v9 .resto-brand-type strong{font-size:25px!important;font-weight:800!important;line-height:1!important;letter-spacing:-.3px!important;color:#fff!important}
body.resto-unified-v9 .resto-brand-type small{font-size:11px!important;color:#d7cbca!important;white-space:nowrap!important}
body.resto-unified-v9 .nav-items,body.resto-unified-v9 .mainnav,body.resto-unified-v9 .menu,body.resto-unified-v9 .side-links{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:5px!important;padding:18px 8px 16px!important;margin:0!important;width:100%!important;position:relative!important;z-index:3!important;max-height:none!important;overflow:visible!important}
body.resto-unified-v9 .resto-unified-nav-item{display:flex!important;flex:0 0 auto!important;align-items:center!important;justify-content:flex-start!important;gap:11px!important;min-width:0!important;width:100%!important;min-height:45px!important;height:auto!important;padding:10px 11px!important;margin:0!important;border:1px solid transparent!important;border-radius:11px!important;background:transparent!important;color:#f3eee9!important;text-decoration:none!important;text-align:left!important;font:600 12px/1.3 Inter,Segoe UI,Arial,sans-serif!important;box-shadow:none!important;white-space:normal!important;cursor:pointer!important;letter-spacing:0!important}
body.resto-unified-v9 .resto-unified-nav-item:hover{background:#342016!important}
body.resto-unified-v9 .resto-unified-nav-item.resto-unified-active{background:linear-gradient(115deg,#ffa21b,#c95600)!important;border-color:#ffad28!important;box-shadow:inset 0 1px 0 #ffc76c66,0 0 12px #ff80001a!important;color:white!important}
body.resto-unified-v9 .resto-nav-icon{flex:none!important;display:grid!important;place-items:center!important;width:22px!important;height:22px!important;min-width:22px!important;color:inherit!important}
body.resto-unified-v9 .resto-nav-icon svg{width:21px!important;height:21px!important;stroke:currentColor!important;fill:none!important;display:block!important}
body.resto-unified-v9 .resto-nav-text{min-width:0!important;flex:1 1 auto!important;display:block!important;font:inherit!important;color:inherit!important;white-space:normal!important}
body.resto-unified-v9 .resto-nav-chevron{flex:none!important;display:block!important;font:400 20px/1 Arial,sans-serif!important;margin-left:auto!important;color:#c4afa1!important;opacity:.9!important}
body.resto-unified-v9 .sidebar-bottom,body.resto-unified-v9 .ambience,body.resto-unified-v9 .sidebar-ambience,body.resto-unified-v9 .sidebar-photo{position:absolute!important;left:0!important;right:0!important;bottom:0!important;height:29%!important;pointer-events:none!important;z-index:0!important;opacity:.6!important;background:linear-gradient(0deg,#09090900,#07070742),url('./resto-unified-ambience.webp') center bottom/cover no-repeat!important;mask-image:linear-gradient(transparent,#000 48%)!important}
body.resto-unified-v9 .resto-unified-header h1{font-size:29px!important;line-height:1.12!important;letter-spacing:-.5px!important;margin-top:0!important}
body.resto-unified-v9 .resto-unified-header p{font-size:12px!important;line-height:1.4!important}
body.resto-unified-v9 .resto-unified-header .search{max-width:280px!important;min-width:0!important;width:clamp(140px,20vw,280px)!important}
body.resto-unified-v9 .resto-unified-header .top-actions,body.resto-unified-v9 .resto-unified-header .header-right{flex-shrink:0!important;gap:8px!important}
body.resto-unified-v9 .resto-unified-header .owner,body.resto-unified-v9 .resto-unified-header .profile{min-width:0!important;max-width:192px!important;height:44px!important}
body.resto-unified-v9 .resto-unified-header .avatar,body.resto-unified-v9 .resto-unified-header .owner-avatar{width:34px!important;height:34px!important;min-width:34px!important;font-size:17px!important}
body.resto-unified-v9 .resto-unified-header .round-icon,body.resto-unified-v9 .resto-unified-header .circle{height:40px!important;width:40px!important;min-height:40px!important;min-width:40px!important}
body.resto-unified-v9 .main-wrap,body.resto-unified-v9 .content,body.resto-unified-v9 .workspace,body.resto-unified-v9 .page{background:#090b10!important;color:#fafafa!important}
@media(min-width:901px) and (max-width:1200px){body.resto-unified-v9 .resto-unified-header .search,body.resto-unified-v9 .resto-unified-header .top-search{width:170px!important}body.resto-unified-v9 .resto-unified-header .owner,body.resto-unified-v9 .resto-unified-header .profile{max-width:162px!important}}
@media(max-width:900px){body.resto-unified-v9 .sidebar,body.resto-unified-v9 .side{width:255px!important;max-width:85vw!important;min-width:0!important;flex-basis:auto!important;position:fixed!important;top:0!important;left:0!important;height:100dvh!important;min-height:0!important;z-index:90!important}body.resto-unified-v9 .main-wrap,body.resto-unified-v9 .content,body.resto-unified-v9 .workspace,body.resto-unified-v9 .page{min-width:0!important;width:100%!important;margin-left:0!important}body.resto-unified-v9 .resto-unified-header h1{font-size:23px!important}body.resto-unified-v9 .resto-unified-header .search,body.resto-unified-v9 .resto-unified-header .top-search{display:none!important}}
@media(max-width:600px){body.resto-unified-v9 .resto-unified-header .owner,body.resto-unified-v9 .resto-unified-header .profile{max-width:64px!important}body.resto-unified-v9 .resto-unified-header .owner>span:nth-child(2),body.resto-unified-v9 .resto-unified-header .profile>span:nth-child(2){display:none!important}}

/* V9.3: one stable shared navigation; no background-photo panel. */
body.resto-unified-v9 aside.sidebar,body.resto-unified-v9 aside.side{display:flex!important;flex-direction:column!important;overflow:hidden!important;background:#08090c!important;isolation:isolate!important}
body.resto-unified-v9 .sidebar-bottom,body.resto-unified-v9 .ambience,body.resto-unified-v9 .sidebar-ambience,body.resto-unified-v9 .sidebar-photo,body.resto-unified-v9 .aside-photo,body.resto-unified-v9 .side-photo{display:none!important;background:none!important;opacity:0!important;visibility:hidden!important}
body.resto-unified-v9 .sidebar::before,body.resto-unified-v9 .side::before,body.resto-unified-v9 .sidebar::after,body.resto-unified-v9 .side::after{background-image:none!important;pointer-events:none!important}
body.resto-unified-v9 .nav-items,body.resto-unified-v9 .mainnav,body.resto-unified-v9 .menu,body.resto-unified-v9 .side-links{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;scrollbar-width:thin;scrollbar-color:#4b3b30 transparent;z-index:3!important}
body.resto-unified-v9 .resto-unified-nav-item{min-height:45px!important;height:45px!important;max-height:45px!important;padding:9px 10px!important;line-height:1.2!important}
body.resto-unified-v9 .resto-nav-text{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;font-size:11.5px!important}
body.resto-unified-v9 .resto-nav-chevron{font-size:17px!important}
body.resto-unified-v9 .resto-unified-upgrade{position:relative!important;z-index:5!important;flex:0 0 auto!important;display:flex!important;align-items:center!important;gap:9px!important;margin:8px!important;min-height:75px!important;padding:12px 10px!important;background:linear-gradient(130deg,#271709,#3b230b)!important;border:1px solid #8d5717!important;border-radius:12px!important;color:#fff!important;text-decoration:none!important;box-shadow:0 2px 14px #0006!important}
body.resto-unified-v9 .resto-unified-upgrade:hover,body.resto-unified-v9 .resto-unified-upgrade:focus-visible{border-color:#ffad24!important;background:linear-gradient(130deg,#352008,#55300e)!important}
body.resto-unified-v9 .resto-upgrade-icon{width:34px;height:34px;flex:0 0 34px;display:grid;place-items:center;border-radius:10px;background:#ff980d;color:#251406}
body.resto-unified-v9 .resto-upgrade-icon svg{width:22px;height:22px}
body.resto-unified-v9 .resto-upgrade-copy{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}
body.resto-unified-v9 .resto-upgrade-copy strong{font:750 13px/1.1 Inter,Segoe UI,Arial,sans-serif;color:#fff}
body.resto-unified-v9 .resto-upgrade-copy small{font:500 10px/1.25 Inter,Segoe UI,Arial,sans-serif;color:#d9b995}
body.resto-unified-v9 .resto-upgrade-chevron{font-size:22px;color:#ffab34}
body.resto-unified-v9 .resto-unified-nav-item:not(.resto-unified-active){background:transparent!important;color:#f3eee9!important;box-shadow:none!important;border-color:transparent!important}
body.resto-unified-v9 .resto-unified-nav-item:not(.resto-unified-active):hover{background:#302016!important}
@media (max-width:900px){body.resto-unified-v9 aside.sidebar,body.resto-unified-v9 aside.side{height:100dvh!important}}

/* V17.1 targeted navigation fix: preserve original layout, add consistent motion and keep bottom links reachable. */
body.resto-unified-v9 aside.sidebar,body.resto-unified-v9 aside.side{min-height:0!important}
body.resto-unified-v9 .nav-items,body.resto-unified-v9 .mainnav,body.resto-unified-v9 .menu,body.resto-unified-v9 .side-links{overscroll-behavior:contain!important;scroll-behavior:auto!important;min-height:0!important;padding-bottom:14px!important}
body.resto-unified-v9 .resto-unified-nav-item{position:relative!important;transition:background-color .19s ease,border-color .19s ease,box-shadow .19s ease,transform .19s ease,color .19s ease!important;transform:translateX(0)!important;will-change:auto}
body.resto-unified-v9 .resto-unified-nav-item:hover{transform:translateX(2px)!important}
body.resto-unified-v9 .resto-unified-nav-item:active{transform:translateX(1px) scale(.985)!important}
body.resto-unified-v9 .resto-unified-nav-item:focus-visible{outline:2px solid #ffb13b!important;outline-offset:-2px!important}
body.resto-unified-v9 .resto-unified-nav-item.resto-unified-active{box-shadow:inset 3px 0 0 #ffcf66,0 2px 13px #ff8c171f!important}
body.resto-unified-v9 .resto-unified-upgrade{min-height:70px!important;flex-shrink:0!important}
@media(prefers-reduced-motion:reduce){body.resto-unified-v9 .resto-unified-nav-item{transition:none!important;transform:none!important}}

/* V17.2 exact sidebar consistency: 9 routes plus Upgrade visible at 768px height. */
@media(min-width:901px){
 body.resto-unified-v9 aside.sidebar,body.resto-unified-v9 aside.side{
   height:100dvh!important;min-height:0!important;overflow:hidden!important;
   display:flex!important;flex-direction:column!important;
 }
 body.resto-unified-v9 .nav-items,body.resto-unified-v9 .mainnav,
 body.resto-unified-v9 nav.menu,body.resto-unified-v9 .side-links{
   display:flex!important;flex:1 1 auto!important;flex-direction:column!important;
   justify-content:space-between!important;gap:2px!important;
   min-height:0!important;margin:0!important;padding:8px 8px 5px!important;
   overflow-y:auto!important;overflow-x:hidden!important;
 }
 body.resto-unified-v9 .resto-unified-nav-item{
   flex:0 0 45px!important;min-height:45px!important;height:45px!important;max-height:45px!important;
   width:100%!important;margin:0!important;
 }
 body.resto-unified-v9 .resto-unified-upgrade{
   flex:0 0 68px!important;min-height:68px!important;height:68px!important;
   margin:5px 8px 8px!important;padding:8px 10px!important;
 }
}
body.resto-unified-v9 .nav-caption,body.resto-unified-v9 .nav-label{
 display:none!important;
}
body.resto-unified-v9 .resto-unified-nav-item.resto-unified-active,
body.resto-unified-v9 .resto-unified-nav-item[aria-current="page"]{
 background:linear-gradient(115deg,#ff9e13,#cf5b00)!important;
 border:1px solid #ffb134!important;color:#fff!important;
 box-shadow:inset 3px 0 0 #ffd16d,0 2px 12px #f80a!important;
}
body.resto-unified-v9 .resto-unified-nav-item:not(.resto-unified-active){
 background:transparent!important;border-color:transparent!important;
}
body.resto-unified-v9 .resto-unified-nav-item{transition:background .16s ease,box-shadow .16s ease,transform .16s ease!important}
body.resto-unified-v9 .resto-unified-nav-item:hover{transform:translateX(2px)!important}
body.resto-unified-v9 .resto-unified-nav-item:active{transform:scale(.98)!important}
@media (prefers-reduced-motion: reduce){body.resto-unified-v9 .resto-unified-nav-item{transition:none!important;transform:none!important}}

/* V17.4: URL-independent, CSS-backed active-state fallback for all nine pages.
   Works even if navigation is delayed or browser cache delivers a legacy script. */
body[data-resto-page="index"] nav .resto-unified-nav-item[data-resto-route="index.html"],
body[data-resto-page="index"] nav .nav-link[data-page="Dashboard"],
body[data-resto-page="index"] nav a[href$="/index.html"],
body[data-resto-page="index"] nav a[href$="index.html"]{
 background:linear-gradient(115deg,#ff9e13,#cf5b00)!important;
 border:1px solid #ffb134!important;color:#fff!important;
 box-shadow:inset 3px 0 0 #ffd16d,0 2px 12px #ff880029!important;
}
body[data-resto-page="setup"] nav .resto-unified-nav-item[data-resto-route="setup.html"],
body[data-resto-page="setup"] nav .nav-link[data-page="Restaurant Setup"],
body[data-resto-page="setup"] nav a[href$="/setup.html"],
body[data-resto-page="setup"] nav a[href$="setup.html"]{
 background:linear-gradient(115deg,#ff9e13,#cf5b00)!important;
 border:1px solid #ffb134!important;color:#fff!important;
 box-shadow:inset 3px 0 0 #ffd16d,0 2px 12px #ff880029!important;
}
body[data-resto-page="billing"] nav .resto-unified-nav-item[data-resto-route="billing.html"],
body[data-resto-page="billing"] nav .nav-link[data-page="Subscription & Billing"],
body[data-resto-page="billing"] nav a[href$="/billing.html"],
body[data-resto-page="billing"] nav a[href$="billing.html"]{
 background:linear-gradient(115deg,#ff9e13,#cf5b00)!important;
 border:1px solid #ffb134!important;color:#fff!important;
 box-shadow:inset 3px 0 0 #ffd16d,0 2px 12px #ff880029!important;
}
body[data-resto-page="menu"] nav .resto-unified-nav-item[data-resto-route="menu.html"],
body[data-resto-page="menu"] nav .nav-link[data-page="Menu & Promotions"],
body[data-resto-page="menu"] nav a[href$="/menu.html"],
body[data-resto-page="menu"] nav a[href$="menu.html"]{
 background:linear-gradient(115deg,#ff9e13,#cf5b00)!important;
 border:1px solid #ffb134!important;color:#fff!important;
 box-shadow:inset 3px 0 0 #ffd16d,0 2px 12px #ff880029!important;
}
body[data-resto-page="orders"] nav .resto-unified-nav-item[data-resto-route="orders.html"],
body[data-resto-page="orders"] nav .nav-link[data-page="Orders & Payments"],
body[data-resto-page="orders"] nav a[href$="/orders.html"],
body[data-resto-page="orders"] nav a[href$="orders.html"]{
 background:linear-gradient(115deg,#ff9e13,#cf5b00)!important;
 border:1px solid #ffb134!important;color:#fff!important;
 box-shadow:inset 3px 0 0 #ffd16d,0 2px 12px #ff880029!important;
}
body[data-resto-page="operations"] nav .resto-unified-nav-item[data-resto-route="operations.html"],
body[data-resto-page="operations"] nav .nav-link[data-page="Operations"],
body[data-resto-page="operations"] nav a[href$="/operations.html"],
body[data-resto-page="operations"] nav a[href$="operations.html"]{
 background:linear-gradient(115deg,#ff9e13,#cf5b00)!important;
 border:1px solid #ffb134!important;color:#fff!important;
 box-shadow:inset 3px 0 0 #ffd16d,0 2px 12px #ff880029!important;
}
body[data-resto-page="owner-attendance"] nav .resto-unified-nav-item[data-resto-route="owner-attendance.html"],
body[data-resto-page="owner-attendance"] nav .nav-link[data-page="Staff & Waiters"],
body[data-resto-page="owner-attendance"] nav a[href$="/owner-attendance.html"],
body[data-resto-page="owner-attendance"] nav a[href$="owner-attendance.html"]{
 background:linear-gradient(115deg,#ff9e13,#cf5b00)!important;
 border:1px solid #ffb134!important;color:#fff!important;
 box-shadow:inset 3px 0 0 #ffd16d,0 2px 12px #ff880029!important;
}
body[data-resto-page="customers"] nav .resto-unified-nav-item[data-resto-route="customers.html"],
body[data-resto-page="customers"] nav .nav-link[data-page="Customers & Rewards"],
body[data-resto-page="customers"] nav a[href$="/customers.html"],
body[data-resto-page="customers"] nav a[href$="customers.html"]{
 background:linear-gradient(115deg,#ff9e13,#cf5b00)!important;
 border:1px solid #ffb134!important;color:#fff!important;
 box-shadow:inset 3px 0 0 #ffd16d,0 2px 12px #ff880029!important;
}
body[data-resto-page="settings"] nav .resto-unified-nav-item[data-resto-route="settings.html"],
body[data-resto-page="settings"] nav .nav-link[data-page="Settings & Support"],
body[data-resto-page="settings"] nav a[href$="/settings.html"],
body[data-resto-page="settings"] nav a[href$="settings.html"]{
 background:linear-gradient(115deg,#ff9e13,#cf5b00)!important;
 border:1px solid #ffb134!important;color:#fff!important;
 box-shadow:inset 3px 0 0 #ffd16d,0 2px 12px #ff880029!important;
}

/* V17.6: isolate each page tab even if older component CSS declares display:grid/flex. */
[hidden], [hidden="hidden"] { display:none!important; }
