/* Vendor portal shell - shared sidebar + content layout used by every
   /vendor/* page. Fully responsive: 248px fixed sidebar on desktop,
   collapsible hamburger drawer below 860px, top bar with toggle on
   mobile. The middle data area always uses 100% of remaining width.
   No more half-blank pages. */

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

/* Default desktop: sidebar fixed at 248px, content fills the rest */
.vd-app {
  display:grid;
  grid-template-columns:248px 1fr;
  min-height:100vh;
  background:#F4F1EC;
}

/* Sidebar */
.vd-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;
}
.vd-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 }
.vd-brand:hover { text-decoration:none }
.vd-brand-mark { width:36px; height:36px; flex-shrink:0; display:grid; place-items:center }
.vd-brand-text { display:flex; flex-direction:column; line-height:1.1 }
.vd-brand-word { font-family:var(--display); color:#FFFFFF; font-weight:700; font-size:1rem; letter-spacing:-0.01em }
.vd-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 }

.vd-nav-shell { display:flex; flex-direction:column; gap:0.18rem; flex:1; overflow-y:auto }
.vd-nav-shell a, .vd-nav-shell 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;
}
.vd-nav-shell a svg, .vd-nav-shell button svg { color:rgba(255,255,255,0.55); flex-shrink:0 }
.vd-nav-shell a:hover, .vd-nav-shell button:hover {
  background:rgba(255,255,255,0.06);
  color:#FFFFFF;
}
.vd-nav-shell a:hover svg, .vd-nav-shell button:hover svg { color:rgba(255,255,255,0.9) }
.vd-nav-shell a.active, .vd-nav-shell button.active {
  background:rgba(247,164,46,0.15);
  color:#FFD175;
}
.vd-nav-shell a.active svg, .vd-nav-shell button.active svg { color:#F7A42E }
.vd-nav-shell .vd-tab-link { color:rgba(255,255,255,0.55); margin-top:0.4rem }

.vd-vendor-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;
}
.vd-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;
}
.vd-vendor-info { display:flex; flex-direction:column; min-width:0; flex:1 }
.vd-vendor-info strong { color:#FFFFFF; font-size:0.9rem; font-weight:700; line-height:1.2; white-space:nowrap; overflow:hidden; text-overflow:ellipsis }
.vd-vendor-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 }
.vd-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;
}
.vd-logout:hover { color:#FFD175 }

/* Main content area - always fills remaining width */
.vd-main {
  padding:1.6rem 1.8rem 3rem;
  min-width:0;
  width:100%;
  box-sizing:border-box;
}

/* Hamburger toggle - hidden on desktop, visible on mobile */
.vd-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);
}
.vd-burger svg { width:22px; height:22px; display:block }

/* Tablet (between 860 and 1100) - condense padding */
@media (max-width: 1100px) {
  .vd-app { grid-template-columns:220px 1fr }
  .vd-main { padding:1.4rem 1.4rem 2.5rem }
}

/* Mobile (under 860px) - sidebar becomes off-canvas drawer */
@media (max-width: 860px) {
  .vd-app { grid-template-columns:1fr }
  .vd-burger { display:flex; align-items:center; justify-content:center }
  .vd-sidebar {
    position:fixed; top:0; left:0; bottom:0;
    width:280px; height:100vh;
    transform:translateX(-100%);
    transition:transform 0.22s ease;
    box-shadow:0 0 0 9999px rgba(0,0,0,0); /* gets darkened when open */
  }
  .vd-sidebar.open { transform:translateX(0); box-shadow:0 0 0 9999px rgba(6,36,65,0.55) }
  .vd-main {
    padding:3.4rem 1.1rem 2rem; /* extra top padding for the burger */
    max-width:100%;
  }
  .vd-vendor-card { flex-direction:row; align-items:center }
}

/* Tiny phones */
@media (max-width: 480px) {
  .vd-main { padding:3.4rem 0.8rem 1.6rem }
}

/* Defensive resets so content panes always paint */
.vd-main > * { max-width:100% }
.vd-main img, .vd-main svg { max-width:100% }
.vd-main table { width:100% }
