/* Shared workspace chrome. Feature layouts and authorization stay page-owned. */
.app-shell {
  --app-rail: 224px;
  --app-accent: #007f78;
  --app-ink: #172d2b;
  --app-muted: #637573;
  --app-border: #dfe8e6;
  display: block;
  margin: 0;
  min-width: 0;
  background: #fff;
  color: var(--app-ink);
  font-family: Inter, ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  line-height: 1.5;
}
.app-shell .app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  box-sizing: border-box;
  width: var(--app-rail);
  height: 100vh;
  height: 100dvh;
  padding: 24px 12px 16px;
  overflow-y: auto;
  background: #fff;
  border: 0;
  border-right: 1px solid var(--app-border);
}
.app-shell .app-brand {
  display: flex;
  flex: none;
  align-items: center;
  gap: 9px;
  margin: 0 12px 28px;
  padding: 0;
  color: var(--app-ink);
  font: 750 20px/1.25 Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -.04em;
  text-decoration: none;
  white-space: nowrap;
}
.app-shell .app-brand .app-monogram {
  display: grid;
  flex: none;
  place-items: center;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border-radius: 8px;
  background: var(--app-accent);
  color: white;
  font: 750 16px/1 system-ui, sans-serif;
  letter-spacing: -.06em;
  transform: none;
}
.app-shell .app-brand .app-wordmark {
  display: inline;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  transform: none;
}
.app-shell .app-workspace-label {
  margin: 28px 10px 9px;
  color: var(--app-muted);
  font: 700 10px/1.5 Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.app-shell .app-nav {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
}
.app-shell .app-nav a {
  display: flex;
  align-items: center;
  box-sizing: border-box;
  min-height: 40px;
  margin: 0;
  padding: 9px 12px;
  gap: 12px;
  border: 0;
  border-radius: 8px;
  color: #415a56;
  background: transparent;
  font: 500 13px/1.5 Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
}
.app-shell .app-nav a:hover { background: #f0f7f4; }
.app-shell .app-nav svg { width: 19px; height: 19px; flex: none; }
.app-shell .app-nav a[aria-current="page"] {
  background: #def3ee;
  color: #00675f;
  font-weight: 700;
}
.app-shell .app-account #sign-out { display: none !important; }
.app-shell .app-account {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--app-border);
}
.app-shell .app-account > a {
  display: flex;
  align-items: center;
  min-height: 36px;
  gap: 12px;
  box-sizing: border-box;
  margin: 0;
  padding: 9px 10px;
  color: var(--app-muted);
  background: transparent;
  border: 0;
  border-radius: 8px;
  font-size: 13px;
  text-decoration: none;
}
.app-shell .app-account > a:hover { background: #f0f7f4; }
.app-shell .app-account > button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border: 0;
  background: transparent;
  color: var(--app-muted);
  text-align: left;
  cursor: pointer;
  position: static;
  width: 100%;
  min-height: 40px;
  margin: 0;
  font-size: 13px;
}
.app-shell .app-account svg { width: 19px; height: 19px; flex: none; }
.app-shell .app-avatar { display: grid; place-items: center; }
.app-shell .app-theme { display: flex; align-items: center; gap: 10px; padding: 0 10px; color: var(--app-muted); }
.app-shell .app-theme select { flex: 1; min-width: 0; width: 100%; min-height: 34px; padding: 4px; border: 0; background: transparent; color: inherit; font-size: 12px; cursor: pointer; }
.app-shell .app-sidebar-note { margin: 0 10px; font-size: 12px; }
.app-shell .app-main {
  box-sizing: border-box;
  width: auto;
  min-width: 0;
  max-width: 1600px;
  margin: 0 0 0 var(--app-rail);
  padding: 28px clamp(20px, 3vw, 40px) 64px;
}
.app-shell .app-breadcrumb {
  display: block;
  margin: 0 0 24px;
  padding: 0 0 16px;
  border: 0;
  border-bottom: 1px solid var(--app-border);
  border-radius: 0;
  background: transparent;
  color: var(--app-muted);
  font-size: 12px;
}
.app-shell .app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 0;
  height: auto;
  margin: 0 0 24px;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--app-border);
  font-size: 12px;
}
.app-shell .app-topbar .app-breadcrumb { margin: 0; padding: 0; border: 0; }
.app-shell .app-page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin: 0 0 24px;
  padding: 0;
}
.app-shell .app-page-heading h1 {
  margin: 0 0 9px;
  color: var(--app-ink);
  font: 750 30px/1.2 Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -.04em;
}
.app-shell .app-page-heading p { margin: 0; color: var(--app-muted); font-size: 15px; }
.app-shell .app-page-heading > .actions { margin-top: 0; }
.app-shell .app-page-heading > button { margin-top: 0; }
.app-shell .app-heading-stacked { display: block; }
.app-shell :where(button, input:not([type="checkbox"]):not([type="radio"]), select) {
  min-height: 40px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
}
.app-shell .primary {
  background: var(--app-accent);
  border-color: var(--app-accent);
  color: white;
}
.app-shell :where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid #42aaa1;
  outline-offset: 3px;
}
.app-shell [hidden] { display: none !important; }
/* Mobile navigation is a disclosure; only the brand and menu button are
   visible until expanded. Account and appearance controls live inside it. */
.app-shell .app-menu-toggle { display: none; }
@media (max-width: 720px) {
  .app-shell .app-sidebar {
    position: static;
    inset: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0;
    width: 100%;
    height: auto;
    min-height: 64px;
    padding: 10px 16px;
    overflow: visible;
    border: 0;
    border-bottom: 1px solid var(--app-border);
  }
  .app-shell .app-brand { grid-column: 1; grid-row: 1; margin: 0; font-size: 20px; }
  .app-shell .app-menu-toggle {
    display: grid;
    place-items: center;
    grid-column: 2;
    grid-row: 1;
    width: 44px;
    height: 44px;
    padding: 10px;
    margin: 0;
    color: var(--app-ink);
    background: transparent;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    cursor: pointer;
  }
  .app-shell .app-menu-toggle svg { width: 22px; height: 22px; }
  .app-shell .app-workspace-label { display: none; }
  .app-shell .app-nav, .app-shell .app-account { display: none; }
  .app-shell .app-sidebar[data-menu-open] .app-nav {
    display: grid;
    grid-column: 1 / -1;
    gap: 4px;
    padding-top: 12px;
  }
  .app-shell .app-sidebar[data-menu-open] .app-account {
    display: grid;
    grid-column: 1 / -1;
    margin-top: 12px;
    padding-top: 12px;
  }
  .app-shell .app-nav a, .app-shell .app-account > a,
  .app-shell .app-account > button, .app-shell .app-theme select { min-height: 44px; }
  .app-shell .app-sidebar-note { display: none; }
  .app-shell .app-main { margin: 0; padding: 22px 16px 48px; }
  .app-shell .app-page-heading > * { min-width: 0; max-width: 100%; }
  .app-shell .app-topbar { flex-wrap: wrap; }
}

.app-shell>.topbar{display:none}.app-shell .shell{display:block}

/* Page-owned legacy span/button styles must not recolor shared navigation. */
.app-shell .app-nav a>span{display:inline;padding:0;border:0;border-radius:0;color:inherit;font:inherit}
.app-shell .app-nav a[aria-current="page"]:visited{color:#00675f}
.app-shell button.quick-launcher{background:#fff;color:#00776f;border:1px solid #dbe5e3;font:600 13px/1.5 Arial,system-ui,sans-serif}
.app-shell .app-nav{background:transparent;border:0}
.app-shell .app-breadcrumb{display:none}
/* Legacy storage rules use body[data-page] .content and otherwise erase the rail. */
.app-shell[data-page] .shell>.app-main{margin:0 0 0 var(--app-rail);width:calc(100% - var(--app-rail));max-width:none;min-width:0}
@media(max-width:720px){.app-shell[data-page] .shell>.app-main{margin:0;width:100%;padding:22px 16px 48px}}
