/* Studio is shared by both brands; Store CTA colors live in fanvue-store.css. */
#sidebar {
  width: 264px;
  max-width: calc(100vw - 32px);
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #393747 #12131b;
  border-right: 1px solid #2a2b39;
  background: #12131b;
  color: #c6c4d4;
}
.shcl-sidebar-inner {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 22px 14px 12px;
}
.shcl-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 8px 25px;
}
.shcl-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  color: #f4efff;
}
.shcl-sidebar-brand img {
  width: 37px;
  height: 37px;
  flex-shrink: 0;
  border-radius: 10px;
  object-fit: contain;
}
.shcl-sidebar-brand strong {
  display: block;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -.2px;
  white-space: nowrap;
}
.shcl-sidebar-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
}
.shcl-sidebar-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 36px;
  flex-shrink: 0;
  border: 1px solid #393747;
  border-radius: 8px;
  color: #c6c4d4;
}
.shcl-sidebar-close:hover {
  background: #1e1f2c;
}
.shcl-sidebar-create-area {
  position: relative;
  margin: 1px 3px 20px;
}
.shcl-sidebar-create {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid #783cff;
  border-radius: 10px;
  background: #5a11fd;
  color: #fff;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
}
.shcl-sidebar-create span {
  flex: 1;
}
.shcl-sidebar-create:hover, .shcl-sidebar-create[aria-expanded="true"] {
  background: #6b2aff;
}
.shcl-sidebar-create.is-current {
  box-shadow: 0 0 0 2px #b59bff;
}
.shcl-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.shcl-sidebar-group-label {
  padding: 0 12px 5px;
  color: #a6a3ba;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  line-height: 1.5;
  text-transform: uppercase;
}
.shcl-sidebar-account-label {
  padding-top: 24px;
}
.shcl-sidebar-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #c6c4d4;
  text-align: left;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 450;
}
.shcl-sidebar-link .shcl-sidebar-icon {
  color: #9694aa;
}
.shcl-sidebar-link:hover {
  color: #fff;
  background: #1e1f2c;
}
.shcl-sidebar-link[aria-current="page"] {
  background: #29223e;
  color: #f4efff;
  border-color: #413156;
  font-weight: 600;
}
.shcl-sidebar-link[aria-current="page"] .shcl-sidebar-icon {
  color: #b59bff;
}
.shcl-sidebar-bottom {
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin-top: auto;
  padding-top: 26px;
}
.shcl-sidebar-plan-card {
  padding: 14px 13px 12px;
  background: #1b1c27;
  border: 1px solid #2a2b39;
  border-radius: 12px;
}
.shcl-sidebar-plan-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.shcl-sidebar-plan-name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #e0dce9;
  font-size: 12px;
  font-weight: 550;
}
.shcl-sidebar-plan-name svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: #c2aaff;
}
.shcl-sidebar-plan-status {
  color: #b6b3c6;
  font-size: 10px;
  text-align: right;
}
.shcl-sidebar-credits {
  margin: 11px 0 12px;
  color: #f4efff;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
}
.shcl-sidebar-credits span {
  margin-left: 3px;
  color: #a6a3ba;
  font-size: 11px;
  font-weight: 400;
}
.shcl-sidebar-plan-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 30px;
  padding-top: 7px;
  border-top: 1px solid #30303f;
  color: #d6c6ff;
  font-size: 11px;
}
.shcl-sidebar-plan-action:hover {
  color: #fff;
}
.shcl-sidebar-plan-action svg {
  width: 15px;
  height: 15px;
}
.shcl-sidebar-account-area {
  position: relative;
}
.shcl-sidebar-account {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 8px 6px;
  border-radius: 9px;
  color: #a6a3ba;
  text-align: left;
}
.shcl-sidebar-account:hover, .shcl-sidebar-account[aria-expanded="true"] {
  background: #1e1f2c;
}
.shcl-sidebar-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  overflow: hidden;
  border: 1px solid #443455;
  border-radius: 50%;
  background: #2d263d;
  color: #c6b3f0;
}
.shcl-sidebar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.shcl-sidebar-avatar .shcl-sidebar-icon {
  width: 17px;
  height: 17px;
}
.shcl-sidebar-account-name {
  flex: 1;
  min-width: 0;
  color: #dddbe7;
  font-size: 12px;
  font-weight: 550;
}
.shcl-sidebar-account-name small {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: #a6a3ba;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 400;
}
.shcl-sidebar-menu {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  padding: 6px;
  background: #20212f;
  border: 1px solid #3a3a50;
  border-radius: 12px;
  box-shadow: 0 12px 32px #0006;
}
.shcl-sidebar-create-menu {
  top: calc(100% + 7px);
}
.shcl-sidebar-account-menu {
  bottom: calc(100% + 8px);
}
#sidebar :is(a, button):focus-visible,
.shcl-app-topbar :is(a, button):focus-visible {
  outline: 2px solid #b59bff;
  outline-offset: 2px;
}
.shcl-app-topbar {
  border-bottom: 1px solid #2a2b39;
  background: #12131b;
  color: #f4efff;
}
.shcl-topbar-menu {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: 1px solid #393747;
  border-radius: 8px;
  background: #1b1c27;
  color: #c6c4d4;
}
.shcl-topbar-menu:hover,
.shcl-topbar-login:hover {
  background: #1e1f2c;
  color: #fff;
}
.shcl-topbar-brand {
  min-width: 0;
  line-height: 1.3;
}
.shcl-topbar-email {
  color: #a6a3ba;
}
.shcl-topbar-account {
  border: 1px solid #443455;
  background: #2d263d;
}
.shcl-topbar-login {
  border-color: #393747;
  background: #1b1c27;
  color: #f4efff;
}
.shcl-topbar-signup {
  border-color: #783cff;
  background: #5a11fd;
  color: #fff;
}
.shcl-topbar-signup:hover {
  background: #6b2aff;
}
.shcl-mobile-dock {
  display: none;
}
@media (min-width: 1024px) {
  .shcl-app-topbar {
    display: none;
  }
  .shcl-app-main {
    margin-left: 264px;
    min-height: 100vh;
  }
  #shclTopProgress {
    top: 0;
    left: 264px;
  }
  #closeSidebarBtn {
    display: none;
  }
}
@media (max-width: 1023px) {
  :root {
    --shcl-mobile-dock-height: calc(79px + env(safe-area-inset-bottom, 0px));
    --shcl-mobile-dock-clearance: calc(var(--shcl-mobile-dock-height) + 13px);
    scroll-padding-bottom: var(--shcl-mobile-dock-clearance);
  }
  .shcl-app-main {
    padding-bottom: var(--shcl-mobile-dock-clearance);
  }
  #toastStack {
    bottom: calc(16px + var(--shcl-mobile-dock-clearance));
  }
  #btnScrollTop {
    bottom: calc(8px + var(--shcl-mobile-dock-height));
  }
  body:has(#mobileStudioDock .shcl-dock-menu:not(.hidden)) #btnScrollTop {
    visibility: hidden;
  }
  .shcl-mobile-dock {
    position: fixed;
    z-index: 35;
    left: 0;
    right: 0;
    bottom: 0;
    display: block;
  }
  .shcl-dock-bar {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: center;
    min-height: var(--shcl-mobile-dock-height);
    padding: 8px max(6px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px));
    border-top: 1px solid #353140;
    background: #12131b;
    box-shadow: 0 -4px 22px #100b242a;
  }
  .shcl-dock-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 0;
    min-height: 56px;
    padding: 3px 0;
    border: 0;
    border-radius: 13px;
    background: transparent;
    color: #aaa6bc;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
  }
  .shcl-dock-icon {
    display: grid;
    place-items: center;
    width: 37px;
    height: 29px;
    border-radius: 10px;
  }
  .shcl-dock-icon .shcl-sidebar-icon {
    width: 21px;
    height: 21px;
  }
  .shcl-dock-link:hover {
    color: #f4efff;
  }
  .shcl-dock-link:is([aria-current="page"], [aria-expanded="true"], .is-current) {
    color: #d4beff;
  }
  .shcl-dock-link:is([aria-current="page"], [aria-expanded="true"], .is-current) .shcl-dock-icon {
    background: #302342;
  }
  .shcl-dock-create {
    position: relative;
    z-index: 6;
    gap: 6px;
    color: #e9ddff;
  }
  .shcl-dock-create .shcl-dock-icon {
    width: 46px;
    height: 46px;
    margin-top: -23px;
    border: 4px solid #12131b;
    border-radius: 16px;
    box-shadow: 0 0 0 1px #7d4ce0;
  }
  .shcl-dock-create .shcl-dock-icon,
  .shcl-dock-create:is(.is-current, [aria-expanded="true"]) .shcl-dock-icon {
    background: #5a11fd;
    color: #fff;
  }
  .shcl-dock-create:hover .shcl-dock-icon {
    background: #6b2aff;
  }
  .shcl-dock-menu {
    bottom: 100%;
    max-height: min(420px, calc(100dvh - var(--shcl-mobile-dock-clearance) - 80px - env(safe-area-inset-top, 0px)));
    overflow: hidden;
    padding: 0;
    border-width: 1px 0 0;
    border-radius: 18px 18px 0 0;
  }
  .shcl-dock-menu:not(.hidden) {
    display: flex;
    flex-direction: column;
  }
  .shcl-dock-menu-body {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0 max(10px, env(safe-area-inset-right, 0px)) 20px max(10px, env(safe-area-inset-left, 0px));
  }
  .shcl-dock-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    gap: 12px;
    padding: 10px max(16px, env(safe-area-inset-right, 0px)) 6px max(22px, env(safe-area-inset-left, 0px));
    color: #f4efff;
  }
  .shcl-dock-menu-header h2 {
    font-size: 14px;
    font-weight: 600;
  }
  .shcl-dock-menu-header .shcl-sidebar-close {
    width: 44px;
    height: 44px;
    border: 0;
  }
  .shcl-dock-personas-heading {
    margin: 9px 6px 4px;
    padding: 14px 6px 4px;
    border-top: 1px solid #3a3a50;
    color: #a6a3ba;
    font-size: 11px;
    font-weight: 500;
  }
  .shcl-dock-persona {
    min-height: 64px;
  }
  .shcl-dock-persona img {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 12px;
    object-fit: cover;
    background: #2d263d;
  }
  .shcl-dock-persona-copy {
    min-width: 0;
    flex: 1;
  }
  .shcl-dock-persona-copy strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 500;
  }
  .shcl-dock-persona-copy small {
    display: block;
    margin-top: 3px;
    color: #c4a7ff;
    font-size: 11px;
  }
  .shcl-dock-refresh-error {
    padding: 8px 12px;
    color: #c6c4d4;
    font-size: 12px;
  }
  #mobileStudioDock :is(a, button):focus-visible {
    outline: 2px solid #b59bff;
    outline-offset: 2px;
  }
  #sidebar:not(.shcl-sidebar-open) {
    visibility: hidden;
  }
  .shcl-sidebar-link {
    min-height: 44px;
  }
  .shcl-sidebar-plan-action {
    min-height: 36px;
  }
}
@media (prefers-reduced-motion: reduce) {
  #sidebar, #sidebar a, #sidebar button {
    transition: none;
  }
}
