/* Unified portal shell for vendor / admin / customer dashboards.
   Single source of truth for sidebar+content layout. Each portal
   loads this CSS plus its own portal-shell-{role}.js to inject the
   role-specific nav. Fully responsive on desktop, tablet, and mobile. */

body.portal-shell { background:#F4F1EC; margin:0; min-height:100vh }

/* On portal pages the dark sidebar IS the nav. The public site header
   and the public site footer are redundant inside the data area, so
   they're hidden. The sidebar's "View site" / "Continue shopping" link
   gives the user a way back to the public-facing site. */
body.portal-shell .site-header,
body.portal-shell .site-footer,
body.portal-shell .daily-winner { display:none !important }

.ps-app {
  display:grid;
  grid-template-columns:248px 1fr;
  min-height:100vh;
  background:#F4F1EC;
}

.ps-sidebar {
  background:#0A1B2F;
  color:rgba(255,255,255,0.85);
  display:flex; flex-direction:column;
  padding:1.2rem 0.9rem 1rem;
  position:sticky; top:0; height:100vh;
  overflow-y:auto;
  z-index:50;
}
.ps-brand { display:flex; align-items:center; gap:0.7rem; padding:0.3rem 0.4rem 1rem; border-bottom:1px solid rgba(255,255,255,0.08); margin-bottom:0.8rem; text-decoration:none }
.ps-brand:hover { text-decoration:none }
.ps-brand-mark { width:36px; height:36px; flex-shrink:0; display:grid; place-items:center }
.ps-brand-text { display:flex; flex-direction:column; line-height:1.1 }
.ps-brand-word { font-family:var(--display); color:#FFFFFF; font-weight:700; font-size:1rem; letter-spacing:-0.01em }
.ps-brand-text small { color:rgba(255,255,255,0.45); font-size:0.7rem; letter-spacing:0.12em; text-transform:uppercase; font-weight:600; margin-top:0.1rem }

.ps-nav { display:flex; flex-direction:column; gap:0.18rem; flex:1; overflow-y:auto }
.ps-nav a, .ps-nav button {
  background:transparent;
  color:rgba(255,255,255,0.75);
  border:0;
  border-radius:8px;
  padding:0.55rem 0.8rem;
  font-size:0.92rem;
  font-weight:500;
  text-align:left;
  display:flex; align-items:center;
  justify-content:flex-start;
  gap:0.7rem;
  text-decoration:none;
  cursor:pointer;
  font-family:inherit;
  width:100%;
  box-sizing:border-box;
}
.ps-nav a svg, .ps-nav button svg { color:rgba(255,255,255,0.55); flex-shrink:0 }
.ps-nav a:hover, .ps-nav button:hover { background:rgba(255,255,255,0.06); color:#FFFFFF }
.ps-nav a:hover svg, .ps-nav button:hover svg { color:rgba(255,255,255,0.9) }
.ps-nav a.active, .ps-nav button.active { background:rgba(247,164,46,0.15); color:#FFD175 }
.ps-nav a.active svg, .ps-nav button.active svg { color:#F7A42E }
.ps-nav .ps-tab-link { color:rgba(255,255,255,0.55); margin-top:0.4rem }

.ps-user-card {
  display:flex; gap:0.7rem; align-items:flex-start;
  padding:0.8rem 0.6rem 0.4rem;
  border-top:1px solid rgba(255,255,255,0.08);
  margin-top:0.6rem;
}
.ps-avatar {
  width:38px; height:38px; flex-shrink:0;
  background:linear-gradient(135deg,#F7A42E,#B8473F);
  color:#0A1B2F;
  border-radius:50%;
  display:grid; place-items:center;
  font-family:var(--display); font-weight:700; font-size:1rem;
}
.ps-user-info { display:flex; flex-direction:column; min-width:0; flex:1 }
.ps-user-info strong { color:#FFFFFF; font-size:0.9rem; font-weight:700; line-height:1.2; white-space:nowrap; overflow:hidden; text-overflow:ellipsis }
.ps-user-info span { color:rgba(255,255,255,0.5); font-size:0.74rem; line-height:1.3; margin-top:0.1rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis }
.ps-logout {
  background:transparent; color:rgba(255,255,255,0.55);
  border:0; padding:0.25rem 0;
  font-size:0.78rem; text-align:left;
  margin-top:0.3rem; text-decoration:underline;
  cursor:pointer; font-family:inherit;
}
.ps-logout:hover { color:#FFD175 }

.ps-main { padding:1.6rem 1.8rem 3rem; min-width:0; width:100%; box-sizing:border-box }
.ps-main > * { max-width:100% }
.ps-main img, .ps-main svg { max-width:100% }
.ps-main table { width:100% }

.ps-burger {
  display:none; position:fixed; top:0.75rem; left:0.75rem; z-index:60;
  background:#0A1B2F; color:#FFFFFF; border:0; border-radius:8px;
  padding:0.55rem 0.7rem; cursor:pointer;
  box-shadow:0 4px 14px rgba(0,0,0,0.25);
}
.ps-burger svg { width:22px; height:22px; display:block }

@media (max-width: 1100px) {
  .ps-app { grid-template-columns:220px 1fr }
  .ps-main { padding:1.4rem 1.4rem 2.5rem }
}

@media (max-width: 860px) {
  .ps-app { grid-template-columns:1fr }
  .ps-burger { display:flex; align-items:center; justify-content:center }
  .ps-sidebar {
    position:fixed; top:0; left:0; bottom:0;
    width:280px; height:100vh;
    transform:translateX(-100%);
    transition:transform 0.22s ease;
  }
  .ps-sidebar.open { transform:translateX(0); box-shadow:0 0 0 9999px rgba(6,36,65,0.55) }
  .ps-main { padding:3.4rem 1.1rem 2rem; max-width:100% }
  .ps-user-card { flex-direction:row; align-items:center }
}

@media (max-width: 480px) {
  .ps-main { padding:3.4rem 0.8rem 1.6rem }
}
