.account-shell:has(> .account-chrome) {
  --sidebar-width: 252px;
  display: grid;
  grid-template: "sidebar toolbar" auto "sidebar context" auto "sidebar main" 1fr / var(--sidebar-width) minmax(0, 1fr);
}

.account-chrome { display: contents; }
.account-shell > .account-main { grid-area: main; }
.account-header { grid-area: context; min-width: 0; }
#account-content { grid-area: main; align-self: start; justify-self: start; }
.account-skip-link {
  position: fixed;
  z-index: 30;
  inset: 12px auto auto 12px;
  transform: translateY(calc(-100% - 20px));
  border-radius: 8px;
  background: white;
  padding: 10px 14px;
  font-weight: 700;
}
.account-skip-link:focus { transform: none; }

.interface-icon { display: block; width: 20px; height: 20px; flex: none; }

.account-toolbar {
  grid-area: toolbar;
  border-bottom: 1px solid var(--account-border);
  background: var(--account-surface);
}
.account-toolbar-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(1280px, calc(100% - 2 * var(--account-gutter)));
  min-height: 62px;
  margin-inline: auto;
  padding-block: 6px;
  font-size: 14px;
}
.account-toolbar-inner > .interface-icon { width: 14px; height: 14px; color: var(--account-muted); }
.account-toolbar-area { min-width: 0; overflow: hidden; color: var(--account-muted); text-overflow: ellipsis; white-space: nowrap; }
.account-toolbar strong { min-width: 0; overflow-wrap: anywhere; }

.account-sidebar {
  --sidebar-ink: #e0ebe6;
  --sidebar-muted: #a9c0b7;
  --sidebar-border: #32514a;
  --sidebar-hover: #24423b;
  --sidebar-surface: #172f2a;
  --sidebar-active: #c7f2d9;
  position: sticky;
  top: 0;
  grid-area: sidebar;
  align-self: start;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100dvh;
  background: var(--sidebar-surface);
  color: var(--sidebar-ink);
}

.account-sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-height: 74px;
  margin-inline: 12px;
  border-bottom: 1px solid var(--sidebar-border);
}
.account-sidebar .account-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 4px;
  border-radius: 8px;
  color: white;
  text-decoration: none;
}
.account-brand-mark {
  display: grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--sidebar-active);
  color: var(--sidebar-surface);
}
.account-brand-mark .interface-icon { width: 24px; height: 24px; }
.account-brand .account-sidebar-label { display: grid; gap: 3px; font-size: 13px; min-width: 0; }
.account-brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-brand small { color: var(--sidebar-muted); font-size: 12px; }

.account-sidebar-toggle, .account-mobile-menu {
  display: none;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  padding: 0 10px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.account-sidebar-toggle { min-width: 36px; padding-inline: 7px; color: var(--sidebar-muted); }
.account-sidebar-toggle:hover { background: var(--sidebar-hover); color: white; }
.account-sidebar :is(a, button, summary):focus-visible { outline-color: var(--sidebar-active); outline-offset: -2px; }

.account-navigation {
  display: grid;
  align-content: start;
  gap: 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--sidebar-border) transparent;
  padding: 14px 12px;
  font-size: 14px;
}
.account-sidebar .account-sidebar-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--sidebar-ink);
  padding: 8px 10px;
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  text-align: start;
  cursor: pointer;
}
.account-sidebar-link > .interface-icon { color: var(--sidebar-muted); }
.account-sidebar .account-sidebar-link:hover, .account-sidebar .account-navigation-menu a:hover { background: var(--sidebar-hover); color: white; }
.account-sidebar .account-sidebar-link[aria-current="page"], .account-sidebar .account-sidebar-link.is-active {
  background: #2a4b41;
  color: var(--sidebar-active);
  font-weight: 740;
}
.account-sidebar-link[aria-current="page"]::before, .account-sidebar-link.is-active::before {
  position: absolute;
  inset: 10px auto 10px 0;
  width: 3px;
  border-radius: 4px;
  background: var(--sidebar-active);
  content: "";
}
.account-sidebar-link[aria-current="page"] > .interface-icon, .account-sidebar-link.is-active > .interface-icon { color: inherit; }
.account-sidebar-divider { height: 1px; margin: 8px 0; background: var(--sidebar-border); }
.account-navigation summary { list-style: none; }
.account-navigation summary::-webkit-details-marker { display: none; }
.account-navigation summary > .interface-icon:last-child { width: 15px; height: 15px; margin-inline-start: auto; }
.account-navigation-group[open] summary > .interface-icon:last-child { transform: rotate(90deg); }
.account-navigation-menu { margin: 4px 0 4px 20px; border-inline-start: 1px solid var(--sidebar-border); padding-inline-start: 9px; }
.account-sidebar .account-navigation-menu a {
  display: flex;
  align-items: center;
  min-height: 39px;
  border-radius: 7px;
  color: var(--sidebar-ink);
  padding: 7px 9px;
  text-decoration: none;
  font-size: 13px;
}
.account-navigation-menu a[aria-current="page"] { background: var(--sidebar-hover); color: var(--sidebar-active); font-weight: 740; }
.account-sidebar-footer { margin-inline: 12px; border-top: 1px solid var(--sidebar-border); padding-block: 10px; font-size: 14px; }
.account-sidebar-footer form { margin: 0; }

@media (width > 900px) {
  .account-chrome[data-sidebar-ready] .account-sidebar-toggle { display: inline-flex; }
  .account-shell:has(> .account-chrome[data-collapsed="true"]) { --sidebar-width: 72px; }
  [data-collapsed="true"] .account-sidebar-top { flex-direction: column; gap: 6px; padding-block: 10px; }
  [data-collapsed="true"] .account-sidebar-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  [data-collapsed="true"] .account-sidebar-link { justify-content: center; padding-inline: 0; }
  [data-collapsed="true"] :is(.account-navigation-menu, .account-navigation summary > .interface-icon:last-child) { display: none; }
}

@media (max-width: 900px) {
  .account-shell:has(> .account-chrome) {
    grid-template: "toolbar" auto "sidebar" auto "context" auto "main" 1fr / minmax(0, 1fr);
  }
  .account-sidebar { position: static; height: auto; grid-template-rows: auto auto auto; }
  .account-sidebar-top, .account-sidebar-footer { margin-inline: var(--account-gutter); }
  .account-sidebar-top { justify-content: start; min-height: 64px; }
  .account-navigation { overflow: visible; padding-inline: var(--account-gutter); }
  .account-navigation-menu a { min-height: 44px; }
  .account-chrome[data-sidebar-ready][data-mobile-open="false"] .account-sidebar { display: none; }
  .account-chrome[data-sidebar-ready] .account-mobile-menu { display: inline-flex; }
  .account-mobile-menu { border-color: var(--account-border); color: var(--account-ink); }
  .account-mobile-menu:hover, .account-mobile-menu[aria-expanded="true"] { background: var(--account-accent-soft); }
}
