/* Shinpo POS v0.50 visual redesign; loaded LAST so older layers do not override */
:root{--v50-navy:#111d35;--v50-purple:#6e28cd}
body:has(.app-shell){background:#f7f8fc;color:#172139}
.app-shell>.v50-sidebar{width:240px!important;min-width:240px!important;align-items:stretch!important;position:sticky!important;top:0!important;height:100vh!important;min-height:100vh!important;padding:26px 12px 18px!important;background:linear-gradient(168deg,#111d35 0%,#18253e 100%)!important;border:0!important;color:#f4f5fc!important;box-shadow:none!important}
.v50-brand{display:flex;align-items:center;gap:12px;padding:6px 13px 29px;color:white;font-size:23px;font-weight:800;letter-spacing:-.7px;white-space:nowrap}.v50-brand b{font-weight:600}.v50-brand-emblem{display:grid;place-items:center;width:40px;height:40px;border-radius:12px;background:linear-gradient(145deg,#9a52f6,#6325bb);font-size:24px;color:#fff}
.v50-sidebar .v50-nav{width:100%;display:flex;flex-direction:column;gap:5px}
.v50-sidebar .v50-nav .nav-link{display:flex!important;flex-direction:row!important;justify-content:flex-start!important;gap:15px!important;align-items:center!important;min-height:46px!important;padding:10px 17px!important;color:#d0d6e8!important;border-radius:13px!important;font-size:14px!important;font-weight:550!important;line-height:1.2!important;white-space:nowrap!important}
.v50-sidebar .v50-nav .nav-link:hover{background:#ffffff14!important;color:white!important}
.v50-sidebar .v50-nav .nav-link.active{background:linear-gradient(110deg,#3f5594,#6e2ac9)!important;color:#fff!important}
.v50-sidebar .nav-icon{font-size:23px!important;width:28px!important;min-width:28px!important;text-align:center!important}
.v50-sidebar .nav-label{display:inline!important;font-size:14px!important;visibility:visible!important}
.v50-sidebar-foot{margin-top:auto;display:grid;gap:12px;padding:12px 8px;border-top:1px solid #ffffff1a}.v50-merchant{display:flex;align-items:center;gap:11px}.v50-merchant-avatar{display:grid;place-items:center;background:#6c2ec6;color:white;border-radius:50%;height:39px;width:39px;font-size:16px;font-weight:750}.v50-merchant strong,.v50-merchant small{display:block}.v50-merchant small{color:#aeb8ca;font-size:11px;margin-top:3px}.v50-logout{background:none;color:#d0d6e8;border:0;padding:9px;font-size:12px;text-align:left;width:100%}
.v50-home{padding:19px 22px 35px!important;max-width:1800px!important;background:#f7f8fc!important;font-family:Inter,ui-sans-serif,system-ui,sans-serif}
.v50-hero{position:relative;display:flex;align-items:center;min-height:244px;border-radius:21px;overflow:hidden;background:linear-gradient(100deg,#f7f4ff,#eae5fa);margin-bottom:17px}.v50-hero-copy{position:relative;z-index:2;width:70%;padding:35px 34px}.v50-kicker{letter-spacing:1.6px;color:#7336c4;font-size:10px;font-weight:850}.v50-hero h1{font-size:clamp(26px,2.6vw,43px);line-height:1.16;letter-spacing:-1.5px;margin:12px 0;color:#0f1d34}.v50-hero h1 span{color:#7130cd}.v50-hero p{font-size:15px;line-height:1.6;margin:0 0 21px;max-width:580px;color:#33435c}.v50-primary-btn{display:inline-flex;align-items:center;justify-content:center;gap:13px;background:#7028cb;color:white;padding:13px 20px;border-radius:12px;font-weight:750;box-shadow:0 9px 24px #7433b42e}.v50-primary-btn:hover{background:#5a1fa8}.v50-hero-photo{position:absolute;right:0;top:0;bottom:0;width:44%;background:url('home-v50-hero.webp') center center/cover no-repeat;mask-image:linear-gradient(90deg,transparent 0%,#000 33%);-webkit-mask-image:linear-gradient(90deg,transparent 0%,#000 33%)}
.v50-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px;margin-bottom:26px}.v50-metric{display:flex;gap:13px;align-items:center;min-height:109px;background:#fff;border:1px solid #e7e8f2;border-radius:17px;padding:18px;box-shadow:0 3px 12px #26344b06}.v50-metric>div{min-width:0}.v50-metric small{display:block;font-size:13px;color:#293449;font-weight:650}.v50-metric strong{display:block;font-size:25px;letter-spacing:-.7px;margin:4px 0;color:#0e1729}.v50-metric-foot{display:block;color:#738198;font-size:11px}.v50-unit{font-size:14px;font-weight:600;letter-spacing:0}.v50-metric-emoji{width:44px;height:44px;flex-shrink:0;border-radius:12px;display:grid;place-items:center;font-size:26px;font-weight:750}.v50-green{background:#ddf6e5;color:#18a552}.v50-blue{background:#e4efff;color:#2772dc}.v50-orange{background:#fff0dd;color:#dd7a16}.v50-violet{background:#f0e8ff;color:#7730d0}
.v50-section-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:13px}.v50-section-head h2{font-size:19px;margin:0;letter-spacing:-.4px}.v50-section-head span{color:#8893a4;font-size:12px}.v50-action-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(175px,1fr));gap:13px;margin-bottom:22px}.v50-action{position:relative;min-height:193px;display:flex;align-items:end;overflow:hidden;border-radius:15px;background-position:center;background-size:cover;box-shadow:0 6px 18px #1a233114;transition:transform .16s,box-shadow .16s}.v50-action:hover{transform:translateY(-3px);box-shadow:0 15px 26px #1a233126}.v50-action:before{content:'';position:absolute;inset:0;background:linear-gradient(0deg,#101322e8 0%,#11142e44 75%)}.v50-card-cash{background-image:url('home-v50-cash.webp')}.v50-card-products{background-image:url('home-v50-products.webp')}.v50-card-customers{background-image:url('home-v50-customers.webp')}.v50-card-orders{background-image:url('home-v50-orders.webp')}.v50-card-reports{background-image:url('home-v50-reports.webp')}.v50-action-content{z-index:1;color:white;display:grid;gap:7px;padding:18px;width:100%}.v50-action-content b{font-size:19px}.v50-action-content small{font-size:12px;line-height:1.45;min-height:36px;color:#eff0f8}.v50-action-content i{position:absolute;right:13px;bottom:14px;width:30px;height:30px;background:white;color:#1c2842;border-radius:50%;display:grid;place-items:center;font-style:normal;font-size:20px}
.v50-panels{display:grid;grid-template-columns:repeat(auto-fit,minmax(310px,1fr));gap:16px}.v50-panel{background:white;border:1px solid #e5e8f2;border-radius:18px;padding:21px;box-shadow:0 3px 12px #24344a07}.v50-panel h2{font-size:18px;color:#182138;margin:0 0 16px;letter-spacing:-.4px}.v50-sale{display:flex;align-items:center;gap:11px;min-height:49px;border-bottom:1px solid #eff1f5;font-size:12px}.v50-sale-icon{width:30px;height:30px;background:#dcf8e6;color:#189952;border-radius:9px;display:grid;place-items:center}.v50-sale b{flex:1}.v50-sale small{color:#8591a3}.v50-sale strong{font-size:13px;margin-left:auto}.v50-panel-link{display:block;text-align:center;margin-top:12px;padding:12px;border:1px solid #e7e8f2;border-radius:10px;font-size:12px;font-weight:700}.v50-panel-link:hover{background:#f6f3ff}.v50-alert{display:flex;gap:12px;align-items:center;padding:15px;border-radius:13px;margin-bottom:10px}.v50-alert>span:first-child{font-size:23px;flex-shrink:0}.v50-alert>span:nth-child(2){flex:1}.v50-alert strong,.v50-alert small{display:block}.v50-alert strong{font-size:13px}.v50-alert small{font-size:11px;margin-top:4px}.v50-alert>b{font-size:19px}.v50-alert-orange{background:#fff5eb;color:#b6600d}.v50-alert-purple{background:#f5efff;color:#5f26b0}.v50-empty{color:#8290a3;font-size:13px;padding:13px 0}
@media(max-width:1050px) and (min-width:769px){.app-shell>.v50-sidebar{width:220px!important;min-width:220px!important}.v50-home{padding:14px!important}.v50-hero-copy{width:77%}}
@media(max-width:768px){.app-shell>.v50-sidebar{position:fixed!important;width:min(84vw,310px)!important;min-width:0!important;transform:translateX(-105%)!important;z-index:142!important}.mobile-nav-open .app-shell>.v50-sidebar{transform:translateX(0)!important}.v50-home{padding:13px!important}.v50-hero{min-height:240px}.v50-hero-copy{width:100%;padding:25px 19px}.v50-hero h1{font-size:29px}.v50-hero p{font-size:13px;max-width:270px}.v50-hero-photo{width:64%;opacity:.22}.v50-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.v50-metric{padding:12px;min-height:105px;gap:8px}.v50-metric-emoji{width:32px;height:32px;font-size:20px}.v50-metric strong{font-size:20px}.v50-metric small{font-size:11px}.v50-action-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.v50-action{min-height:170px}.v50-action-content{padding:13px}.v50-action-content b{font-size:16px}.v50-action-content small{font-size:11px;padding-right:10px}.v50-panels{grid-template-columns:minmax(0,1fr)}.v50-panel{padding:16px}}
@media(max-width:390px){.v50-metrics{grid-template-columns:minmax(0,1fr)}.v50-action-grid{grid-template-columns:minmax(0,1fr)}}

/* v0.50.1: fix layout integration - reserve sidebar's actual width. */
@media (min-width:769px){
  body:has(.v50-sidebar) .app-shell{
    display:grid!important;
    grid-template-columns:240px minmax(0,1fr)!important;
    align-items:stretch!important;
    min-width:0!important;
  }
  body:has(.v50-sidebar) .app-main{grid-column:2!important;width:100%!important;min-width:0!important;max-width:none!important;overflow:clip!important}
  body:has(.v50-sidebar) .app-main>main{width:100%!important;min-width:0!important;max-width:1800px!important;margin:0 auto!important;padding:0 18px 28px!important}
  body:has(.v50-sidebar) .app-main>main>.v50-home{padding:18px 0 28px!important;max-width:100%!important}
  body:has(.v50-sidebar) .app-shell>.v50-sidebar{grid-column:1!important;width:240px!important;min-width:0!important;max-width:240px!important;z-index:10!important}
}
@media (min-width:769px) and (max-width:1050px){
  body:has(.v50-sidebar) .app-shell{grid-template-columns:220px minmax(0,1fr)!important}
  body:has(.v50-sidebar) .app-shell>.v50-sidebar{width:220px!important;max-width:220px!important}
}
/* No legacy content width or margin can push the homepage under the sidebar. */
body:has(.v50-sidebar) .v50-home,body:has(.v50-sidebar) .v50-hero,body:has(.v50-sidebar) .v50-metrics,body:has(.v50-sidebar) .v50-action-grid{min-width:0;max-width:100%}
body:has(.v50-sidebar) .v45-business{position:relative!important;z-index:1!important;min-width:0!important;box-sizing:border-box!important}
@media(max-width:768px){
  body:has(.v50-sidebar) .app-shell{display:block!important;grid-template-columns:none!important}
  body:has(.v50-sidebar) .app-main{width:100%!important;max-width:100%!important;min-width:0!important}
  body:has(.v50-sidebar) .app-main>main{width:100%!important;padding:10px 12px 30px!important;max-width:100%!important}
  body:has(.v50-sidebar) .app-main>main>.v50-home{padding:8px 0 22px!important}
  body:has(.v50-sidebar) .app-shell>.v50-sidebar{max-width:min(84vw,310px)!important}
}

/* v0.56.2: una imagen real, vinculada al rubro del tenant, sin background fijo */
.v50-hero .v562-hero-image{position:absolute;right:0;top:0;bottom:0;width:44%;height:100%;display:block;object-fit:cover;object-position:center;background:none!important;mask-image:linear-gradient(90deg,transparent 0%,#000 33%);-webkit-mask-image:linear-gradient(90deg,transparent 0%,#000 33%);pointer-events:none}
@media(max-width:768px){.v50-hero .v562-hero-image{width:64%;opacity:.22}}

/* v0.57: keep hero photos driven exclusively by the selected tenant sector. */
.v50-hero .v562-hero-image{background-image:none!important}

/* v0.57: avoid horizontal scrolling in POS homepage and keep primary content compact. */
.v50-home,.v50-hero,.v50-metrics,.v50-action-grid,.v50-panels{box-sizing:border-box;width:100%;max-width:100%;min-width:0}
.v50-home{overflow-x:clip}.v50-action-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr));gap:10px;margin-bottom:15px}.v50-action{min-width:0;min-height:150px}.v50-metrics{grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr));margin-bottom:14px;gap:10px}.v50-metric{min-width:0;min-height:92px;padding:12px}.v50-hero{min-height:210px;margin-bottom:12px}.v50-section-head{margin:0 0 9px}.v50-panels{grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr))}.v50-hero .v562-hero-image{max-width:47%;object-position:center right}
@media(max-width:768px){.v50-action-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.v50-hero .v562-hero-image{max-width:70%}}
