/* MKT-83R-26B: Unified StoredX AI account experience */

#sidebar {
  display:flex!important;
  flex-direction:column!important;
  height:100vh!important;
  height:100dvh!important;
  overflow:hidden!important;
}

#sidebar > .brand {
  flex:0 0 auto;
  padding:15px 13px!important;
}

/* Compact navigation: retain all eight destination links */
#sidebar .sx-unified-nav {
  flex:1 1 auto!important;
  min-height:0;
  overflow-y:auto;
  padding:6px 7px!important;
  scrollbar-width:thin;
}

#sidebar .sx-unified-nav nav {
  gap:0!important;
}

#sidebar .sx-unified-nav nav a {
  min-height:35px!important;
  padding:7px 9px!important;
  font-size:11px!important;
  line-height:1.2!important;
}

/* Replace the previous oversized account and upgrade sections */
#sidebar .sidebar-bottom {
  flex:0 0 auto!important;
  padding:9px!important;
  margin:0!important;
}

#sidebar .sidebar-bottom > :not(.sx-mini-membership) {
  display:none!important;
}

#sidebar .sx-mini-membership {
  display:flex;
  gap:9px;
  align-items:center;
  background:#1a3050;
  border:1px solid #345174;
  border-radius:10px;
  padding:9px 10px;
  color:#e7efff;
}

#sidebar .sx-mini-membership-icon {
  color:#f4c66c;
  font-size:17px;
}

#sidebar .sx-mini-membership-body {
  min-width:0;
  flex:1;
}

#sidebar .sx-mini-membership-plan {
  color:#fff;
  font-size:11px;
  font-weight:800;
}

#sidebar .sx-mini-membership-status {
  color:#b7cbe7;
  font-size:10px;
  margin-top:3px;
}

/* Top-right account control */
.top-right .sx-user-trigger {
  display:flex;
  gap:7px;
  align-items:center;
  border:1px solid #d7e3f6;
  background:#fff;
  padding:4px 8px 4px 4px;
  border-radius:25px;
  cursor:pointer;
  color:#203451;
  font:inherit;
}

.top-right .sx-user-avatar {
  display:grid;
  place-items:center;
  width:29px;
  height:29px;
  border-radius:50%;
  background:#245fdb;
  color:#fff;
  font-size:12px;
  font-weight:800;
}

.top-right .sx-user-plan {
  color:#1c56c3;
  font-size:10px;
  font-weight:850;
}

.top-right .sx-user-trigger:hover,
.top-right .sx-user-trigger:focus-visible {
  border-color:#2563eb;
  box-shadow:0 0 0 2px #dbeafe;
}

/* Render the dropdown outside the header to avoid clipping */
.sx-user-dropdown {
  position:fixed;
  z-index:2147483000;
  width:min(318px,calc(100vw - 24px));
  background:#fff;
  border:1px solid #dce5f2;
  border-radius:14px;
  box-shadow:0 16px 45px rgba(13,31,58,.19);
  padding:15px;
  color:#203451;
  font-family:Arial,Helvetica,sans-serif;
}

.sx-user-dropdown[hidden] {
  display:none!important;
}

.sx-menu-heading {
  color:#72839d;
  font-size:10px;
  font-weight:800;
  letter-spacing:1px;
}

.sx-menu-email {
  display:block;
  margin-top:8px;
  font-size:12px;
  color:#243a59;
  overflow-wrap:anywhere;
}

.sx-menu-membership {
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  padding:12px 0;
  margin-top:9px;
  border-top:1px solid #e6ecf5;
  border-bottom:1px solid #e6ecf5;
}

.sx-menu-badge {
  padding:5px 9px;
  background:#e0ecff;
  color:#1f58c7;
  border-radius:6px;
  font-size:11px;
  font-weight:800;
}

.sx-menu-state {
  font-size:11px;
  color:#64748b;
}

.sx-menu-link,
.sx-menu-logout {
  display:block;
  width:100%;
  box-sizing:border-box;
  padding:11px;
  margin-top:8px;
  border-radius:8px;
  text-align:left;
  color:#253d60;
  background:transparent;
  border:0;
  text-decoration:none!important;
  font:inherit;
  font-size:12px;
  cursor:pointer;
}

.sx-menu-link:hover,
.sx-menu-logout:hover {
  background:#eff5ff;
  color:#1955c5;
}

.sx-menu-logout {
  color:#b42335;
  border-top:1px solid #edf1f7;
  border-radius:0;
}

.sx-menu-error {
  margin:8px 0 0;
  color:#b42335;
  font-size:11px;
}

@media(max-height:690px) {
  #sidebar .sx-unified-nav nav a {
    min-height:31px!important;
    padding:5px 8px!important;
  }
}

@media(max-width:680px) {
  .top-right .sx-user-plan {
    display:none;
  }
}
