.customer-shell {
  --nav-width: 300px;
  --topbar-height: 95px;
}

.customer-shell .topbar,
.customer-shell .sidebar {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0;
}

.customer-shell .topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 0 23px;
  border-bottom: 1px solid #e3e3e3;
  background: #fff;
}

.customer-shell .topbar button,
.customer-shell .chat-button {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
}

.customer-shell .hamburger {
  display: grid;
  gap: 5px;
}

.customer-shell .hamburger span { height: 3px; background: #686868; }
.customer-shell .top-actions { margin-left: auto; display: flex; align-items: center; gap: 24px; }
.customer-shell .notification { display: grid; place-items: center; width: 40px; height: 40px; color: #1d1d1d; }
.customer-shell .topbar .avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #087cff;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 2px 6px rgb(0 0 0 / 28%);
}

.customer-shell .topbar svg,
.customer-shell .sidebar svg {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.customer-shell .layout {
  display: grid;
  grid-template-columns: var(--nav-width) minmax(0, 1fr);
  min-height: calc(100vh - var(--topbar-height));
}

.customer-shell .layout > main { min-width: 0; }

.customer-shell .sidebar {
  display: flex;
  flex-direction: column;
  position: sticky;
  top: var(--topbar-height);
  height: calc(100dvh - var(--topbar-height));
  overflow-y: auto;
  border-right: 1px solid #e3e3e3;
  background: #fff;
}

.customer-shell .nav-list { display: grid; gap: 2px; padding: 16px 10px; }
.customer-shell .nav-link {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px;
  border-radius: 4px;
  color: #6d6d6d;
  text-decoration: none;
  font-size: 22px;
  font-weight: 800;
}
.customer-shell .nav-link span { min-width: 0; overflow-wrap: anywhere; }
.customer-shell .nav-link:hover { background: #f5f7f9; }
.customer-shell .nav-link.active { color: #087cff; background: #edf6ff; }
.customer-shell .nav-link:focus-visible { outline: 2px solid #087cff; outline-offset: -2px; }

.customer-shell .sidebar-footer { display: flex; align-items: center; gap: 20px; padding: 24px 18px; margin-top: auto; }
.customer-shell .chat-button { flex: 0 0 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; background: #087cff; color: #fff; }

@media (max-width: 1500px) {
  .customer-shell .nav-link { font-size: 18px; }
}

.customer-shell .layout.sidebar-collapsed {
  --nav-width: 0px;
  grid-template-columns: minmax(0, 1fr);
}

.customer-shell .layout.sidebar-toggle-layout > .sidebar[hidden],
.sidebar-backdrop[hidden] {
  display: none;
}

.customer-shell .topbar .hamburger {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 9px 7px;
  align-content: center;
}

.hamburger:focus-visible {
  outline: 2px solid var(--blue, #087cff);
  outline-offset: 3px;
}

.sidebar-backdrop {
  position: fixed;
  inset: var(--topbar-height) 0 0;
  z-index: 60;
  border: 0;
  padding: 0;
  background: rgb(0 0 0 / 25%);
}

@media (max-width: 1000px) {
  .customer-shell .layout.sidebar-toggle-layout {
    --nav-width: 0px;
    grid-template-columns: minmax(0, 1fr);
  }

  .customer-shell .layout.sidebar-toggle-layout > .sidebar:not([hidden]) {
    display: flex;
    position: fixed;
    z-index: 70;
    top: var(--topbar-height);
    left: 0;
    width: min(300px, calc(100vw - 48px));
    height: calc(100dvh - var(--topbar-height));
    overflow-y: auto;
    overscroll-behavior: contain;
    box-shadow: 6px 0 18px rgb(0 0 0 / 12%);
  }

  body.sidebar-drawer-open {
    overflow: hidden;
  }
}

.top-actions {
  position: relative;
}

.avatar[aria-expanded="true"] {
  outline: 3px solid rgb(8 124 255 / 18%);
  outline-offset: 4px;
}

.account-menu {
  position: absolute;
  z-index: 80;
  top: 56px;
  right: 0;
  width: 340px;
  border: 1px solid #dedede;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 32px rgb(0 0 0 / 16%);
  color: #333;
  overflow: hidden;
}

.account-menu[hidden] {
  display: none;
}

.account-menu-profile {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 20px;
  border-bottom: 1px solid #e8e8e8;
}

.account-menu-avatar {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #087cff;
  color: #fff;
  font-size: 24px;
  font-weight: 800;
}

.account-menu-profile strong,
.account-menu-profile span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu-profile strong {
  color: #242424;
  font-size: 19px;
}

.account-menu-profile span {
  margin-top: 4px;
  color: #777;
  font-size: 14px;
}

.account-menu-actions {
  padding: 8px;
}

.customer-shell .topbar .account-menu-item {
  width: 100%;
  min-height: 48px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #444;
  font-size: 16px;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
}

.customer-shell .topbar .account-menu-item:hover,
.customer-shell .topbar .account-menu-item:focus-visible {
  background: #f1f6fd;
  color: #087cff;
  outline: 0;
}

.customer-shell .topbar .account-menu-item svg {
  width: 21px;
  height: 21px;
  flex-basis: 21px;
  stroke-width: 2.2;
}

.customer-shell .topbar .account-menu-billing {
  grid-template-columns: 24px auto minmax(0, 1fr);
}

.account-menu-balance {
  min-width: 0;
  padding: 8px 0;
  color: #6b7280;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  overflow-wrap: anywhere;
}

.account-menu-balance[hidden] {
  display: none;
}

.account-menu-balance[data-state="nonnegative"] {
  color: #18733c;
}

.account-menu-balance[data-state="negative"] {
  color: #bd2d24;
}

.customer-shell .topbar .account-menu-item.logout {
  color: #bd2d24;
}

@media print {
  .customer-shell > .topbar,
  .customer-shell .sidebar,
  .sidebar-backdrop { display: none !important; }
}

@media (max-width: 640px) {
  .customer-shell { --topbar-height: 72px; }
  .customer-shell .topbar { gap: 12px; padding-inline: 12px; }
  .customer-shell .top-actions { gap: 12px; flex: 0 0 auto; }

  .account-menu {
    position: fixed;
    top: var(--topbar-height, 72px);
    right: 12px;
    left: 12px;
    width: auto;
  }
}
