.shell {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  --chrome-height: 52px;
}
.main { flex: 1; min-width: 0; }
.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex: none;
  flex-direction: column;
  width: clamp(155px, 14vw, 204px);
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: var(--surface);
}
.logo {
  display: flex;
  align-items: center;
  flex: none;
  gap: 8px;
  height: var(--chrome-height);
  padding: 0 12px;
  border-bottom: 1px solid var(--line-soft);
  font-size: .875rem;
  font-weight: 650;
  white-space: nowrap;
}
.logo .brand-logo { width: 25px; height: 25px; }
.logo .logo-name {
  min-width: 0;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
  line-height: 1.25;
}
.nav {
  flex: 1;
  padding: 10px 8px;
  overflow: auto;
  scrollbar-width: thin;
}
.nav .nav-entry {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 34px;
  padding: 5px 8px;
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  white-space: nowrap;
}
.nav .nav-entry:hover { background: var(--surface-muted); }
.nav .nav-entry.active {
  background: var(--accent-soft);
  color: var(--accent-text);
  font-weight: 650;
}
.nav .nav-entry.active::before {
  content: "";
  position: absolute;
  inset: 5px auto 5px 0;
  width: 2px;
  background: currentColor;
}
.nav .nav-entry:focus-visible { outline-offset: -2px; }
.nav .nav-icon { display: flex; flex: 0 0 18px; align-items: center; color: var(--subtle); }
.nav .nav-icon svg { width: 17px; height: 17px; }
.nav .active .nav-icon, .nav .nav-entry:hover .nav-icon, .nav .parent-active .nav-icon { color: var(--accent-text); }
.nav .nav-label { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.nav .nav-parent { font-weight: 600; }
.nav .nav-arrow { display: flex; color: var(--subtle); transition: transform .16s ease; }
.nav .nav-arrow svg { width: 15px; height: 15px; }
.nav .nav-arrow.expanded { transform: rotate(180deg); }
.nav-children { margin: 2px 0 4px 15px; padding-left: 4px; border-left: 1px solid var(--line); }
.nav .nav-child { min-height: 32px; font-size: .8125rem; }
.nav .nav-child .nav-icon svg { width: 15px; height: 15px; }

.top {
  min-height: var(--chrome-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 7px 12px;
  padding: 6px clamp(12px, 1.25vw, 22px);
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface);
}
.top-location, .top-account, .page-location { display: flex; align-items: center; min-width: 0; gap: 8px; }
.page-location { gap: 7px; }
.page-location span { color: var(--subtle); white-space: nowrap; font-size: .8125rem; }
.page-location h1 { margin: 0; font-size: 1.125rem; line-height: 1.35; font-weight: 650; }
.top-account { flex-wrap: wrap; }
.account-name { max-width: 168px; display: grid; text-align: right; font-size: 13px; line-height: 1.35; font-weight: 650; }
.account-name > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-name small { color: var(--subtle); font-size: .75rem; font-weight: 400; }
.top-account button { white-space: nowrap; }
.top-account #duty-button { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); }
.top-account #duty-button::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.top-account #duty-button[data-duty="active"] { color: #2e6a55; }
.top-account #duty-button[data-duty="scheduled"] { color: #865018; }
.top-account #duty-button:hover { background: var(--accent-soft); color: var(--accent-hover); }
.fold-button, .mobile-nav-button {
  display: inline-grid;
  flex: none;
  width: 32px;
  min-height: 32px;
  place-items: center;
  padding: 2px;
  color: var(--subtle);
}
.fold-button svg, .mobile-nav-button svg { width: 18px; height: 18px; }
.sidebar-backdrop, .sidebar-dismiss, .mobile-nav-button { display: none; }

.tabs {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  min-height: 35px;
  padding: 3px clamp(12px, 1.25vw, 22px);
  overflow: auto hidden;
  scrollbar-width: thin;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.tab {
  display: flex;
  flex: none;
  gap: 1px;
  border: 1px solid transparent;
  border-radius: 4px;
  white-space: nowrap;
}
.tab:not(.active):hover { background: var(--surface-muted); }
.tab.active { border-color: var(--line); background: var(--accent-soft); }
.tab-open, .tab-close {
  min-height: 26px;
  padding: 2px 7px;
  border: 0;
  background: transparent;
  font-size: 13px;
}
.tab.active .tab-open { color: var(--accent-text); font-weight: 650; }
.tab-close { width: 25px; padding: 0; color: var(--subtle); font-size: 17px; }

@media (min-width: 761px) {
  .sidebar-folded .sidebar { width: 53px; }
  .sidebar-folded .logo { justify-content: center; padding: 0; }
  .sidebar-folded .logo span, .sidebar-folded .nav-label, .sidebar-folded .nav-arrow { display: none; }
  .sidebar-folded .nav .nav-entry { justify-content: center; padding-inline: 0; }
  .sidebar-folded .nav-children { margin-left: 0; padding-left: 0; border: 0; }
}
@media (max-width: 760px) {
  .shell { --chrome-height: 56px; }
  body:has(.shell.sidebar-open) { overflow: hidden; }
  .sidebar {
    position: fixed;
    z-index: 82;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(270px, 86vw);
    visibility: hidden;
    transform: translateX(-100%);
    transition: transform .18s;
  }
  .sidebar-open .sidebar { visibility: visible; transform: none; }
  .sidebar-backdrop {
    position: fixed;
    z-index: 81;
    inset: 0;
    width: 100%;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    visibility: hidden;
    opacity: 0;
    background: #242e3b5c;
    transition: opacity .18s;
  }
  .sidebar-backdrop:hover:not(:disabled) { background: #242e3b5c; }
  .sidebar-backdrop, .sidebar-dismiss, .mobile-nav-button { display: grid; }
  .sidebar-open .sidebar-backdrop { visibility: visible; opacity: 1; }
  .sidebar-dismiss { flex: none; min-width: 34px; margin-left: auto; place-items: center; padding: 0; font-size: 23px; }
  .fold-button, .page-location > span { display: none; }
  .top { padding-inline: 12px; }
  .tabs { padding-inline: 12px; }
  .tab-open, .tab-close { min-height: 36px; }
}
@media (max-width: 410px) {
  .top { gap: 7px; }
  .top-location, .top-account { gap: 6px; }
  .top-account { width: 100%; justify-content: flex-end; }
  .account-name { margin-right: auto; text-align: left; }
  .top-account button { padding-inline: 7px; font-size: 12px; }
}
@media (pointer: coarse) {
  .nav .nav-entry, .fold-button, .mobile-nav-button, .tab-open, .tab-close { min-height: 44px; }
  .mobile-nav-button, .sidebar-dismiss, .tab-close { width: 44px; }
}
