/* Shared application frame; business panes remain in their feature stylesheet. */
#admin-shell {
  display: contents;
}
.shell-menu-toggle {
  display: none;
}
.top,
.app-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding: var(--space-3) max(var(--space-4), calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
  flex: none;
}
.top .brand {
  margin-right: auto;
  letter-spacing: 0.08em;
  color: #10233f;
  text-decoration: none;
}
.top .brand span {
  font-weight: 400;
  letter-spacing: 0;
}
.top p {
  margin: 0;
}
.top a {
  display: inline-flex;
  align-items: center;
  min-height: var(--control-height);
}
.shell-tools,
.shell-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  min-width: 0;
}
.app-nav {
  gap: var(--space-5);
  padding-block: var(--space-2);
  background: color-mix(in srgb, var(--color-surface) 88%, #e8f1ff);
}
.nav-group {
  color: #7990a8;
  font-size: var(--text-xs);
  font-weight: 650;
}
.app-nav button,
.app-nav a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--control-height);
  padding: var(--space-2) var(--space-3);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  font-size: var(--text-sm);
  color: var(--color-text);
  text-decoration: none;
  font-weight: 550;
}
.app-nav [aria-current='page'] {
  background: var(--color-surface);
  border-color: #c9d9ed;
  box-shadow: 0 1px 3px #17203312;
  color: var(--color-link);
}
.app-nav a:hover {
  background: var(--color-hover);
}
.app-nav [data-destination]::before {
  display: inline-grid;
  place-items: center;
  width: 1.25rem;
  color: var(--color-link);
  font-size: 0.95rem;
  line-height: 1;
}
.app-nav [data-destination='conversations']::before {
  content: '◌';
}
.app-nav [data-destination='availability']::before {
  content: '◐';
}
.app-nav [data-destination='outdoor']::before {
  content: '✦';
}
.app-nav [data-destination='contacts']::before {
  content: '◉';
}
.app-nav [data-destination='seo']::before {
  content: '⌁';
}
.app-nav [data-destination='translations']::before {
  content: '文';
}
.app-nav [data-destination='team']::before {
  content: '◉';
}
.app-nav [data-destination='credentials']::before {
  content: '⚿';
}
.app-nav [data-destination='jobs']::before {
  content: '◷';
}
.page-header {
  padding: var(--space-5) max(var(--space-4), calc((100vw - 1180px) / 2))
    var(--space-4);
  border-bottom: 0;
  flex: none;
}
.route-placeholder {
  grid-area: main;
  display: grid;
  align-content: start;
  gap: var(--space-3);
  padding: clamp(var(--space-4), 3vw, var(--space-6));
}
.route-placeholder .surface {
  max-width: 48rem;
}
.page-header p {
  margin-bottom: var(--space-1);
  font-size: var(--text-xs);
}
.page-header #breadcrumb a { color: inherit; text-decoration: underline; text-underline-offset: 0.14em; }
.page-header #breadcrumb a:hover { color: var(--color-link); }
.page-header #breadcrumb [aria-current='page'] { color: var(--color-muted); }
@media (max-width: 899px) {
  .shell-menu-toggle {
    display: inline-flex;
    align-items: center;
  }
  .app-nav:not(.is-open) {
    display: none;
  }
  .top {
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-xs);
  }
  .top .brand {
    letter-spacing: 0.04em;
  }
  .page-header {
    padding: var(--space-2) var(--space-3);
  }
  .page-header h1 {
    font-size: var(--text-title);
  }
}

/* Shell V2 — proprietary AYAQ frame: graphite bar, role-aware left rail and
   full-width business canvas. It intentionally composes with existing panes. */
.top {
  grid-area: top;
  min-height: 3.5rem;
  padding: var(--space-2) var(--space-4);
  color: #f8fafc;
  background: #111;
  border: 0;
  box-shadow: 0 1px 0 #ffffff14;
}
.top .brand {
  display: inline-flex;
  align-items: center;
  gap: 0.62rem;
  margin-right: 0;
  color: inherit;
  font-size: 1rem;
  letter-spacing: -0.03em;
}
.top .brand-logo {
  display: block;
  width: clamp(4.5rem, 9vw, 6.25rem);
  height: auto;
  max-height: 1.5rem;
  object-fit: contain;
}
.top .brand .brand-platform {
  color: #fff;
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1;
  letter-spacing: 0.095em;
  white-space: nowrap;
}
.shell-icon {
  width: 1.25rem;
  height: 1.25rem;
}
.top .shell-icon-button {
  position: relative;
  display: inline-grid;
  width: 2.25rem;
  height: 2.25rem;
  min-height: 2.25rem;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 0.5rem;
  color: #f8fafc;
  background: transparent;
  text-decoration: none;
  cursor: pointer;
  transition: color 120ms ease;
}
.top .shell-icon-button:hover,
.top .shell-icon-button[aria-expanded='true'] {
  color: #c5f66c;
  background: transparent;
}
.top .shell-icon-button:focus-visible {
  outline: 2px solid #c5f66c;
  outline-offset: 2px;
}
.notification-count {
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
  display: grid;
  width: 1.2rem;
  min-width: 1.2rem;
  height: 1.2rem;
  place-items: center;
  padding: 0;
  border: 2px solid #111;
  border-radius: 999px;
  color: #1b2705;
  background: var(--color-accent);
  font-size: 0.68rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-align: center;
}
.shell-search {
  position: relative;
  flex: 1 1 16rem;
  max-width: 34rem;
  margin-left: clamp(0.5rem, 2vw, 2rem);
}
.shell-search input {
  width: 100%;
  min-height: 2.25rem;
  box-sizing: border-box;
  padding: 0 0.8rem;
  border: 1px solid #ffffff26;
  border-radius: 0.5rem;
  color: #fff;
  background: #ffffff12;
  font: inherit;
}
.shell-search input::placeholder {
  color: #c6c9ce;
}
.shell-search input:hover {
  border-color: #ffffff45;
  background: #ffffff18;
}
.shell-search input:focus {
  border-color: #c5f66c;
  outline: 2px solid #c5f66c33;
  outline-offset: 1px;
  background: #ffffff1d;
}
.shell-search-results {
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 0;
  right: 0;
  z-index: 10;
  overflow: hidden;
  border: 1px solid #35383d;
  border-radius: 0.6rem;
  background: #202124;
  box-shadow: 0 12px 28px #0000004a;
}
.shell-search-result {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 2.55rem;
  padding: 0.45rem 0.7rem;
  color: #f7f7f7;
  text-decoration: none;
}
.shell-search-result:hover,
.shell-search-result:focus-visible {
  color: #fff;
  background: #303136;
}
.shell-search-result-kind,
.shell-search-empty {
  margin: 0;
  color: #aeb2ba;
  font-size: var(--text-xs);
}
.shell-search-empty {
  padding: 0.75rem;
}
.shell-tools {
  margin-left: auto;
}
.shell-tools .badge,
.shell-tools select,
.top button {
  min-height: 2.25rem;
  color: #f8fafc;
  border-color: #ffffff2e;
  background: #ffffff12;
}
.shell-tools select option {
  color: var(--color-text);
  background: var(--color-surface);
}
.shell-account {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: var(--space-2);
}
.shell-release {
  padding: 0.25rem 0.48rem;
  border: 1px solid #ffffff2e;
  border-radius: 999px;
  color: #d4d7dc;
  background: #ffffff0d;
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
}
.shell-release[hidden] { display: none; }
.shell-ai-cost {
  position: relative;
  display: inline-grid;
  width: 2.25rem;
  height: 2.25rem;
  min-height: 2.25rem;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  cursor: pointer;
}
.shell-ai-cost:hover,
.shell-ai-cost[aria-expanded='true'] { background: #ffffff12; }
.shell-ai-cost:focus-visible { outline: 2px solid #c5f66c; outline-offset: 2px; }
.shell-ai-cost-dot {
  width: .72rem;
  height: .72rem;
  border: 2px solid #111;
  border-radius: 50%;
  background: #9da3ae;
  box-shadow: 0 0 0 1px #ffffff33;
}
.shell-ai-cost[data-state='healthy'] .shell-ai-cost-dot { background: #67c58a; }
.shell-ai-cost[data-state='warning'] .shell-ai-cost-dot { background: #f4bc54; }
.shell-ai-cost[data-state='critical'] .shell-ai-cost-dot { background: #ef7b73; }
.ai-cost-panel {
  position: absolute;
  top: calc(100% + .5rem);
  right: 5.7rem;
  z-index: 20;
  width: min(25rem, calc(100vw - 2rem));
  max-height: min(38rem, calc(100dvh - 5rem));
  overflow: auto;
  padding: var(--space-3);
  border: 1px solid #3a3c41;
  border-radius: .6rem;
  color: #f8fafc;
  background: #202124;
  box-shadow: 0 14px 30px #00000052;
}
.ai-cost-panel[hidden] { display: none; }
.ai-cost-panel-title { margin: 0; font-size: var(--text-base); }
.ai-cost-panel-updated { margin: .3rem 0 var(--space-3); color: #c6c9ce; font-size: var(--text-xs); }
.ai-cost-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem .8rem; margin: 0; }
.ai-cost-metrics div { display: grid; gap: .1rem; padding: .42rem .5rem; border: 1px solid #ffffff12; border-radius: .4rem; }
.ai-cost-metrics dt { color: #c6c9ce; font-size: .7rem; }
.ai-cost-metrics dd { margin: 0; color: #f8fafc; font-size: var(--text-sm); font-weight: 650; font-variant-numeric: tabular-nums; }
.ai-cost-findings { display: grid; gap: .55rem; margin-top: var(--space-3); }
.ai-cost-group { padding: .55rem; border: 1px solid #ffffff12; border-left: 3px solid #8ea0ad; border-radius: .4rem; }
.ai-cost-group.is-warning { border-left-color: #f4bc54; }
.ai-cost-group.is-actions { border-left-color: #c5f66c; }
.ai-cost-group h3 { margin: 0 0 .25rem; font-size: var(--text-sm); }
.ai-cost-group ul { display: grid; gap: .25rem; margin: 0; padding-left: 1rem; color: #d8dce2; font-size: var(--text-xs); line-height: 1.4; }
.ai-cost-manage-link { margin-left: .45rem; color: #d7ff85; font-weight: 650; }
.shell-profile { position: relative; }
.notification-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 3.2rem;
  z-index: 20;
  width: min(23rem, calc(100vw - 2rem));
  max-height: min(34rem, calc(100dvh - 5rem));
  overflow: auto;
  padding: var(--space-3);
  border: 1px solid #3a3c41;
  border-radius: 0.6rem;
  color: #f8fafc;
  background: #202124;
  box-shadow: 0 14px 30px #00000052;
}
.notification-panel[hidden] { display: none; }
.notification-panel-title { margin: 0; font-size: var(--text-base); }
.notification-panel-status { margin: .3rem 0 var(--space-2); color: #c6c9ce; font-size: var(--text-xs); }
.notification-panel-list { display: grid; gap: .35rem; }
.notification-panel-item {
  display: grid;
  gap: .2rem;
  padding: .55rem;
  border: 1px solid #ffffff12;
  border-left: 3px solid #8ea0ad;
  border-radius: .4rem;
  color: #f8fafc;
  text-decoration: none;
}
.notification-panel-item[data-severity='warning'] { border-left-color: #f4bc54; }
.notification-panel-item[data-severity='error'] { border-left-color: #f08080; }
.notification-panel-item:hover, .notification-panel-item:focus-visible { background: #ffffff16; }
.notification-panel-item strong { font-size: var(--text-sm); }
.notification-panel-item span, .notification-panel-item small { color: #c6c9ce; font-size: var(--text-xs); }
.notification-panel-all { display: block; margin-top: var(--space-2); color: #d2f890; font-size: var(--text-sm); font-weight: 650; }
.profile-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 20;
  display: grid;
  min-width: 11.5rem;
  padding: 0.3rem;
  border: 1px solid #3a3c41;
  border-radius: 0.6rem;
  background: #202124;
  box-shadow: 0 14px 30px #00000052;
}
.profile-menu[hidden] { display: none; }
.profile-menu a,
.profile-menu button {
  display: block;
  width: 100%;
  min-height: 2.25rem;
  padding: 0.4rem 0.55rem;
  border: 0;
  border-radius: 0.38rem;
  color: #f8fafc;
  background: transparent;
  font: inherit;
  font-size: var(--text-sm);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.profile-menu a:hover,
.profile-menu a:focus-visible,
.profile-menu button:hover,
.profile-menu button:focus-visible {
  color: #fff;
  background: #ffffff16;
}
.app-nav {
  grid-area: nav;
  z-index: 3;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-2);
  border-right: 1px solid #e3e5e8;
  border-bottom: 0;
  background: #f6f6f7;
}
.nav-rail-header,
.nav-rail-brand,
.nav-rail-toggle {
  display: none;
}
.shell-group {
  display: grid;
  gap: 0.15rem;
}
.nav-module-row {
  display: grid;
  gap: 0.125rem;
}
.nav-group {
  display: block;
  padding: 0 var(--space-2) var(--space-1);
  color: #6d7175;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}
.nav-session-notice {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding: 0 var(--space-2);
  color: #6d7175;
  font-size: 0.72rem;
  line-height: 1.35;
}
.nav-session-notice a {
  min-height: auto;
  padding: 0;
  color: #456c09;
  font-size: inherit;
  font-weight: 650;
  text-decoration: underline;
}
.app-nav button,
.app-nav a {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 2.25rem;
  padding: var(--space-2);
  border-radius: 0.5rem;
  color: #303030;
  font-size: var(--text-sm);
  font-weight: 560;
  text-align: left;
}
  .app-nav .nav-module {
    /* The parent row is the only first-level control: no trailing disclosure
       competes with the actual module destination. */
    padding-right: var(--space-2);
  }
  .app-nav .nav-module-control {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 0.15rem;
  }
  .app-nav .nav-module-control .nav-module { flex: 1 1 auto; min-width: 0; }
.app-nav .nav-module.is-current-module {
  border-color: var(--color-accent-hover);
  background: var(--color-accent);
  color: var(--color-on-accent);
  font-weight: 650;
}
.app-nav .nav-brick[aria-current='page']:hover {
  border-color: #dceec1;
  background: var(--color-selected);
  color: #24340d;
  transform: none;
}
.nav-submenu {
  display: grid;
  gap: 0.1rem;
  padding: 0.1rem 0 0.25rem 0.8rem;
}
.nav-submenu[hidden] {
  display: none;
}

.feature-navigation {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin: 0 2rem 1.1rem;
  padding: .35rem;
  width: fit-content;
  max-width: calc(100% - 4rem);
  border: 1px solid var(--color-border, #dce4d2);
  border-radius: .75rem;
  background: #fff;
}

.feature-navigation a {
  padding: .48rem .7rem;
  border-radius: .5rem;
  color: var(--color-ink, #1d2939);
  font-size: .88rem;
  font-weight: 650;
  text-decoration: none;
}

.feature-navigation a:hover {
  background: #f2fbdc;
}

.feature-navigation a:focus-visible {
  background: #f2fbdc;
  outline: 2px solid var(--color-focus, #4d7c0f);
  outline-offset: 2px;
}

.feature-navigation a[aria-current='page'] {
  background: #a3e635;
  color: #24340d;
}
.app-nav a.nav-brick,
.app-nav button.nav-brick {
  min-height: 2rem;
  padding: 0.38rem var(--space-2);
  border-color: transparent;
  color: #646970;
  font-weight: 500;
  transition: background-color 140ms ease, color 140ms ease, transform 140ms ease;
}
.app-nav .nav-brick::before {
  display: none;
}
.app-nav a.nav-brick:hover,
.app-nav button.nav-brick:hover {
  border-color: transparent;
  color: #303030;
  background: #e9eaec;
  transform: translateX(2px);
}
.app-nav .nav-brick:focus-visible {
  outline: 2px solid #719a2d;
  outline-offset: 1px;
}
.app-nav button:hover,
.app-nav a:hover {
  border-color: #e1e3e5;
  background: #eceeef;
}
.app-nav .is-unavailable,
.app-nav button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
.app-nav .is-unavailable:hover,
.app-nav button:disabled:hover {
  border-color: transparent;
  background: transparent;
}
.app-nav [aria-current='page'] {
  border-color: #dceec1;
  color: #24340d;
  background: var(--color-selected);
  box-shadow: inset 3px 0 var(--color-accent);
}
  .app-nav .nav-module-icon {
    width: 1.18rem;
    height: 1.18rem;
    flex: 0 0 1.18rem;
    color: #4a4f55;
  }
.page-header {
  grid-area: header;
  padding: var(--space-5) clamp(var(--space-4), 2.6vw, var(--space-6))
    var(--space-4);
  border-bottom: 1px solid #e9eaeb;
  background: #fafafa;
}
.shell-context-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  width: fit-content;
  max-width: 100%;
  margin-top: var(--space-3);
  padding: 0.25rem;
  border: 1px solid #d9ddd2;
  border-radius: 0.65rem;
  background: #fff;
}
.shell-context-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.35rem 0.68rem;
  border-radius: 0.45rem;
  color: #3f454d;
  font-size: var(--text-sm);
  font-weight: 650;
  text-decoration: none;
}
.shell-context-tabs a:hover,
.shell-context-tabs a:focus-visible { background: #edf8d4; color: #24340d; }
.shell-context-tabs a[aria-current='page'] { background: var(--color-accent); color: #24340d; }
@media (min-width: 900px) {
  /* Feature styles are loaded after this common shell on some legacy panels.
     The ID makes the rail grid authoritative regardless of that load order. */
  body:has(#admin-navigation) {
    display: grid;
    grid-template: 'nav top' auto 'nav header' auto 'nav main' minmax(
        0,
        1fr
      ) / 3.875rem minmax(0, 1fr);
    min-height: 100dvh;
  }
  .top {
    display: grid;
    grid-template-columns: minmax(12rem, 1fr) minmax(16rem, 34rem) minmax(12rem, 1fr);
    gap: var(--space-3);
    position: sticky;
    top: 0;
    z-index: 5;
  }
  .top .brand { grid-column: 1; }
  .shell-search { grid-column: 2; width: 100%; margin-left: 0; }
  .shell-menu-toggle,
  .shell-tools { display: none !important; }
  .shell-account { grid-column: 3; justify-self: end; margin-left: 0; }
  .app-nav {
    position: sticky;
    top: 0;
    z-index: 6;
    align-self: start;
    width: 3.875rem;
    height: 100dvh;
    box-sizing: border-box;
    padding: 0.62rem 0.44rem;
    gap: 0.55rem;
    color: #e8e8e8;
    background: #101010;
    border-right: 1px solid #303030;
    /* The compact submenu and the rail tooltip deliberately extend outside
       the rail. A scroll container would clip both of them. */
    overflow: visible;
    transition: width 160ms ease, box-shadow 160ms ease;
  }
  .app-nav.is-expanded {
    width: 13.75rem;
    box-shadow: 10px 0 24px #00000040;
  }
  body:has(#admin-navigation.app-nav.is-expanded) {
    grid-template-columns: 13.75rem minmax(0, 1fr);
  }
  /* A declared N3 moves into its own Shopify-like contextual rail.  The
     compact global rail stays available as the visual spine on the left. */
  body:has(#admin-context-navigation:not([hidden])) {
    grid-template: 'nav context top' auto 'nav context header' auto 'nav context main' minmax(0, 1fr) / 3.875rem 15rem minmax(0, 1fr);
  }
  .admin-context-rail {
    grid-area: context;
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    width: 15rem;
    height: 100dvh;
    min-height: 0;
    flex-direction: column;
    gap: 0.7rem;
    overflow: auto;
    padding: 0.76rem 0.7rem;
    color: #e8e8e8;
    background: #101010;
    border-right: 1px solid #303030;
  }
  .admin-context-rail__header {
    display: flex;
    min-height: 2rem;
    align-items: center;
    gap: 0.38rem;
  }
  .admin-context-rail__back {
    display: grid;
    width: 2rem;
    height: 2rem;
    min-height: 2rem;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 0.45rem;
    color: #e8e8e8;
    background: transparent;
    font-size: 1.8rem;
    font-weight: 400;
    line-height: 1;
  }
  .admin-context-rail__back:hover:not(:disabled),
  .admin-context-rail__back:focus-visible {
    border-color: transparent;
    color: #fff;
    background: #2a2a2a;
  }
  .admin-context-rail__back:focus-visible {
    outline: 2px solid #a3e635;
    outline-offset: 2px;
  }
  .admin-context-rail__title {
    margin: 0;
    color: #f3f3f3;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.2;
  }
  .admin-context-rail__search {
    width: 100%;
    min-height: 2.25rem;
    padding: 0.42rem 0.65rem 0.42rem 2rem;
    border: 1px solid #57575a;
    border-radius: 0.7rem;
    color: #f3f3f3;
    background: linear-gradient(90deg, #3d3d3f 0 1.45rem, #343436 1.45rem);
    font-size: 0.88rem;
  }
  .admin-context-rail__search::placeholder { color: #d1d1d2; }
  .admin-context-rail__search:focus-visible { outline: 2px solid #a3e635; outline-offset: 2px; }
  .admin-context-rail__list {
    display: grid;
    align-content: start;
    gap: 0.12rem;
  }
  .admin-context-rail__link {
    display: flex;
    min-height: 2.2rem;
    align-items: center;
    padding: 0.42rem 0.62rem;
    border: 1px solid transparent;
    border-radius: 0.68rem;
    color: #dfdfdf;
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none;
  }
  .admin-context-rail__link:hover,
  .admin-context-rail__link:focus-visible { color: #fff; border-color: transparent; background: #272727; }
  .admin-context-rail__link[aria-current='page'] { color: #fff; background: linear-gradient(#383838, #292929); box-shadow: inset 0 1px #ffffff1d; }
  .app-nav .shell-group {
    display: flex;
    width: 100%;
    min-height: 0;
    flex: 1;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.18rem;
  }
  /* Settings is the last stable rail action, like Shopify’s gear. It lives
     at the visual foot of the application rail regardless of registry order. */
  .app-nav .nav-settings-row { order: 1000; margin-top: auto; }
  .app-nav .nav-rail-header {
    position: relative;
    display: grid;
    width: 100%;
    min-height: 2rem;
    place-items: center;
    margin-bottom: var(--space-1);
  }
  .app-nav .nav-rail-brand {
    display: grid;
    width: 2rem;
    height: 2rem;
    place-items: center;
    border-radius: 0.55rem;
    background: transparent;
  }
  /* The mark is a home link, not a control: an open rail must leave it
     completely still on hover.  The compact rail hides it because the exact
     same slot is then occupied by the expand-navigation control. */
  .app-nav .nav-rail-brand:hover {
    border-color: transparent;
    background: transparent;
  }
  .app-nav .nav-rail-brand:focus-visible {
    outline: 2px solid #a3e635;
    outline-offset: 2px;
  }
  .app-nav .nav-rail-brand img {
    display: block;
    width: 1.42rem;
    height: 1.42rem;
    border-radius: 0.25rem;
  }
  .app-nav .nav-rail-toggle {
    position: absolute;
    display: grid;
    width: 2rem;
    height: 1.875rem;
    min-height: 1.875rem;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 0.75rem;
    color: #dcdcdc;
    background: transparent;
    font: inherit;
    font-size: 0;
    cursor: pointer;
    transition: background-color 120ms ease;
  }
  .nav-rail-toggle .shell-icon {
    width: 1rem;
    height: 1rem;
  }
  .nav-rail-tooltip {
    position: absolute;
    top: 0;
    left: calc(100% + 0.55rem);
    z-index: 7;
    display: flex;
    width: max-content;
    max-width: 13rem;
    align-items: center;
    gap: 0.48rem;
    padding: 0.42rem 0.5rem;
    border: 1px solid #515154;
    border-radius: 0.42rem;
    color: #f8fafc;
    background: #1d1d1f;
    box-shadow: 0 8px 18px #0000003d;
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1.15;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-0.2rem);
    transition: opacity 120ms ease, transform 120ms ease;
  }
  .nav-rail-tooltip-shortcut { display: inline-flex; gap: 0.16rem; }
  .nav-rail-tooltip kbd {
    padding: 0.12rem 0.25rem;
    border-radius: 0.18rem;
    color: #f3f3f3;
    background: #48484a;
    font: 700 0.65rem/1 var(--font-sans);
  }
  #admin-navigation .nav-rail-toggle:hover:not(:disabled),
  #admin-navigation .nav-rail-toggle:focus-visible {
    /* Keep this deliberately quieter than a selected menu item.  This
       selector also wins over the shared button hover token, which is pale
       yellow in the light canvas and was leaking into the dark rail. */
    border-color: transparent;
    background: #2a2a2a;
  }
  #admin-navigation .nav-rail-toggle:focus-visible {
    outline: 2px solid #a3e635;
    outline-offset: 2px;
  }
  .nav-rail-toggle:hover .nav-rail-tooltip,
  .nav-rail-toggle:focus-visible .nav-rail-tooltip {
    opacity: 1;
    transform: translateX(0);
  }
  /* Do not leave the label visible after a mouse/touch activation.  It will
     be eligible again only after pointerleave, i.e. on a fresh rollover. */
  .nav-rail-toggle[data-tooltip-suppressed='true'] .nav-rail-tooltip {
    opacity: 0 !important;
    transition: none;
  }
  .app-nav:not(.is-expanded) {
    align-items: center;
    padding-inline: var(--space-2);
  }
  .app-nav:not(.is-expanded) .shell-group {
    width: 100%;
  }
  .app-nav:not(.is-expanded) .nav-rail-brand {
    visibility: hidden;
    pointer-events: none;
  }
  .app-nav:not(.is-expanded) .nav-session-notice,
  .app-nav:not(.is-expanded) .nav-submenu {
    display: none !important;
  }
  .app-nav:not(.is-expanded) .nav-module {
    justify-content: center;
    padding: var(--space-2);
    font-size: 0;
  }
  .app-nav:not(.is-expanded) .nav-module-icon {
    width: 1.22rem;
    height: 1.22rem;
    flex-basis: 1.22rem;
  }
  /* Compact rail: children remain discoverable in a temporary popover,
     without changing the user's persistent rail choice. */
  .app-nav:not(.is-expanded) .nav-module-row { position: relative; }
  .app-nav:not(.is-expanded) .nav-module-row::after {
    position: absolute;
    top: 0;
    left: 100%;
    width: 0.7rem;
    height: 100%;
    content: '';
  }
  .app-nav:not(.is-expanded) .nav-module-row:hover .nav-submenu,
  .app-nav:not(.is-expanded) .nav-module-row:focus-within .nav-submenu {
    position: absolute;
    top: 0;
    left: calc(100% + 0.7rem);
    z-index: 10;
    display: grid !important;
    width: max-content;
    min-width: 10.5rem;
    max-width: 15rem;
    gap: 0.12rem;
    padding: 0.42rem;
    border: 1px solid #343434;
    border-radius: 0.85rem;
    background: #171717;
    box-shadow: 0 10px 24px #0000005c;
  }
  .app-nav:not(.is-expanded) .nav-submenu::before {
    display: block;
    padding: 0.28rem 0.5rem 0.38rem;
    content: attr(data-module-label);
    color: #f4f4f4;
    font-size: 0.82rem;
    font-weight: 700;
  }
  .app-nav:not(.is-expanded) .nav-submenu .nav-brick {
    min-height: 2.1rem;
    padding: 0.42rem 0.55rem;
    border-radius: 0.52rem;
    color: #dedede;
    font-size: 0.8rem;
  }
  .app-nav:not(.is-expanded) .nav-submenu .nav-brick[data-navigation-depth='2'] {
    display: none;
  }
  .app-nav:not(.is-expanded) .nav-submenu .nav-brick:hover,
  .app-nav:not(.is-expanded) .nav-submenu .nav-brick:focus-visible {
    color: #fff;
    background: #383838;
    transform: none;
  }
  .app-nav.is-expanded .nav-rail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .app-nav.is-expanded .nav-rail-brand {
    margin-left: 0;
    visibility: visible;
    pointer-events: auto;
  }
  .app-nav.is-expanded .nav-rail-toggle {
    position: static;
    background: transparent;
  }
  .app-nav.is-expanded .nav-rail-tooltip {
    top: 50%;
    right: calc(100% + 0.55rem);
    left: auto;
    display: block;
    transform: translateY(-50%) translateX(0.2rem);
  }
  .app-nav.is-expanded .nav-rail-tooltip { display: flex; }
  .app-nav.is-expanded .nav-rail-toggle:hover .nav-rail-tooltip,
  .app-nav.is-expanded .nav-rail-toggle:focus-visible .nav-rail-tooltip {
    transform: translateY(-50%) translateX(0);
  }
  .app-nav.is-expanded .nav-rail-toggle[data-tooltip-suppressed='true'] .nav-rail-tooltip {
    transform: translateY(-50%) translateX(0.2rem);
  }
  .app-nav .nav-module,
  .app-nav .nav-brick { color: #d6d6d6; }
  .app-nav .nav-module:hover,
  .app-nav .nav-brick:hover { color: #fff; border-color: transparent; background: #272727; }
  .app-nav .nav-brick { color: #c2c2c2; }
  .app-nav .nav-module.is-current-module {
    color: #17220d;
    background: var(--color-accent);
    border-color: var(--color-accent);
  }
  .app-nav [aria-current='page'] {
    /* Current brique and current module are deliberately distinct: the
       module carries the apple-green context, while its exact destination is
       the quieter pale-green selection requested for the hierarchy. */
    color: #24340d;
    background: #f2fbdc;
    border-color: #dceec1;
    box-shadow: inset 3px 0 var(--color-accent);
  }
  .app-nav .nav-module-icon { color: #bdbdbd; }
  .app-nav .nav-module.is-current-module .nav-module-icon { color: currentColor; }
  body > main,
  body > #desk,
  body > #availability,
  body > #admin,
  body > #error {
    grid-area: main;
    min-width: 0;
  }
}
@media (max-width: 899px) {
  .top {
    position: sticky;
    top: 0;
    z-index: 5;
    min-height: 3.25rem;
  }
  .shell-tools {
    display: none;
  }
  .shell-search {
    order: 3;
    flex-basis: 100%;
    max-width: none;
    margin-left: 0;
  }
  .shell-account {
    margin-left: auto;
  }
  .app-nav {
    position: absolute;
    top: 3.25rem;
    left: 0;
    width: min(19rem, calc(100vw - 2rem));
    max-height: calc(100dvh - 3.25rem);
    overflow: auto;
    border-radius: 0 0 var(--radius-panel) 0;
    box-shadow: var(--shadow-overlay);
  }
  .page-header {
    padding: var(--space-4) var(--space-3) var(--space-3);
  }
}
