/* RouteLogic shared application shell. One component owns navigation on every
   screen so labels, spacing, settings, and alerts cannot drift page by page. */
*, *::before, *::after { box-sizing: border-box; }
.app-shell {
  position: sticky; top: 0; z-index: 120; flex: none;
  min-height: 70px; width: 100%;
  display: flex; align-items: center; gap: 13px;
  padding: 10px 18px;
  background: var(--cc); color: #fff;
  border-bottom: 1px solid var(--cc-dk);
  white-space: nowrap;
}
.shell-home { flex: none; display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.shell-logo { width: 62px; height: 44px; object-fit: cover; border-radius: 9px; }
.shell-brand { display: flex; flex-direction: column; line-height: 1.05; }
.shell-brand strong { font-size: 17px; font-weight: 850; letter-spacing: -.02em; }
.shell-brand small { margin-top: 4px; color: rgba(255,255,255,.68); font-size: 10.5px; font-weight: 400; letter-spacing: .025em; }
.shell-page-name { flex: none; padding-left: 13px; border-left: 1px solid rgba(255,255,255,.2); color: rgba(255,255,255,.82); font-size: 12px; font-weight: 750; }
.app-shell[data-page="editor"] .shell-page-name { color: #fff; }
.shell-spacer { flex: 1 1 auto; min-width: 10px; }
.shell-tools { flex: none; display: flex; align-items: center; gap: 7px; }
.shell-btn, .shell-icon-btn {
  height: 38px; border: 1.5px solid rgba(255,255,255,.34); border-radius: 9px;
  background: rgba(255,255,255,.08); color: #fff;
  font: 750 13px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  text-decoration: none; cursor: pointer;
}
.shell-btn { padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.shell-btn:hover, .shell-icon-btn:hover, .shell-icon-btn[aria-expanded="true"] { background: rgba(255,255,255,.2); }
.shell-btn.primary { background: rgba(255,255,255,.16); }
.shell-back::before { content: "←"; font-size: 15px; }
.shell-icon-btn { position: relative; width: 40px; display: grid; place-items: center; padding: 0; }
.shell-icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.shell-count { min-width: 18px; padding: 2px 5px; border-radius: 999px; background: rgba(0,0,0,.2); color: #fff; text-align: center; font-size: 10px; }
.shell-badge { position: absolute; right: -5px; top: -7px; min-width: 19px; height: 19px; padding: 0 5px; display: grid; place-items: center; border: 2px solid var(--cc); border-radius: 999px; background: #f0b849; color: #211704; font-size: 9px; font-weight: 900; }
.shell-badge[hidden] { display: none; }
.shell-pop-wrap { position: relative; }
.shell-menu, .notice-panel {
  position: absolute; z-index: 250; right: 0; top: calc(100% + 10px);
  border: 1px solid var(--line-2); border-radius: 13px;
  background: var(--panel); color: var(--ink); box-shadow: 0 20px 58px rgba(0,0,0,.38);
}
.shell-menu[hidden], .notice-panel[hidden] { display: none; }
.shell-menu { width: 224px; padding: 8px; }
.shell-menu a { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 9px; color: var(--ink); text-decoration: none; font-size: 13px; }
.shell-menu a:hover, .shell-menu a:focus-visible { background: var(--panel-3); outline: none; }
.shell-menu a[aria-current="page"] { background: var(--ok-bg); color: var(--cc-lt); }
.shell-menu i { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 7px; background: var(--track); color: var(--cc-lt); font-style: normal; font-size: 12px; }
.shell-menu b { font-weight: 750; }
.notice-panel { width: 380px; max-height: min(620px, calc(100vh - 92px)); overflow: hidden; }
.notice-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 15px; border-bottom: 1px solid var(--line); }
.notice-head h2 { margin: 0; font-size: 15px; }
.notice-head button { border: 0; background: none; color: var(--cc-lt); font: 750 10.5px/1 inherit; cursor: pointer; }
.notice-list { max-height: 510px; overflow-y: auto; padding: 8px; }
.notice-item { display: block; padding: 11px; margin-bottom: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); color: var(--ink); text-decoration: none; }
.notice-item:hover { border-color: var(--line-2); }
.notice-item.unread { border-left: 3px solid var(--danger); }
.notice-item.medium.unread { border-left-color: #f0b849; }
.notice-item strong { display: block; font-size: 12px; }
.notice-item span { display: block; margin-top: 3px; color: var(--muted); font-size: 10.5px; line-height: 1.4; }
.notice-item small { display: block; margin-top: 5px; color: var(--muted-2); font-size: 9px; font-weight: 750; text-transform: uppercase; letter-spacing: .07em; }
.notice-empty { padding: 34px 20px; text-align: center; }
.notice-empty b { display: block; color: var(--cc-lt); font-size: 24px; }
.notice-empty strong { display: block; margin-top: 7px; font-size: 13px; }
.notice-empty p { margin: 3px 0 0; color: var(--muted); font-size: 10.5px; }

.shell-crew-ctl { display: flex; align-items: center; gap: 7px; padding: 4px 8px 4px 11px; border: 1.5px solid rgba(255,255,255,.28); border-radius: 9px; }
.shell-crew-ctl > span:first-child { color: rgba(255,255,255,.64); font-size: 10px; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.shell-crew-ctl button { width: 27px; height: 27px; border: 0; border-radius: 7px; background: rgba(255,255,255,.14); color: #fff; font: 750 17px/1 inherit; cursor: pointer; }
.shell-crew-ctl #crewCount { min-width: 18px; color: #fff; text-align: center; font-size: 16px; font-weight: 850; }
.shell-seg { display: flex; border: 1.5px solid rgba(255,255,255,.28); border-radius: 9px; overflow: hidden; }
.shell-seg button { height: 36px; padding: 0 16px; border: 0; background: transparent; color: rgba(255,255,255,.75); font: 750 13px/1 inherit; cursor: pointer; }
.shell-seg button.on { background: #fff; color: var(--cc); }
.shell-mode { display: flex; gap: 3px; padding: 3px; border: 1px solid rgba(255,255,255,.26); border-radius: 9px; }
.shell-mode button { height: 30px; padding: 0 13px; border: 0; border-radius: 6px; background: transparent; color: rgba(255,255,255,.72); font: 750 12px/1 inherit; cursor: pointer; }
.shell-mode button.on { background: #fff; color: var(--cc); }

@media (max-width: 900px) {
  .app-shell { min-height: 62px; padding: 8px 10px; gap: 8px; overflow-x: auto; }
  .shell-logo { width: 50px; height: 36px; }
  .shell-brand strong { font-size: 14px; }
  .shell-brand small { font-size: 9px; }
  .shell-page-name { display: none; }
  .shell-spacer { min-width: 2px; }
  .shell-btn { padding: 0 9px; font-size: 11px; }
  .notice-panel { position: fixed; left: 8px; right: 8px; top: 70px; width: auto; }
}
