/* App shell: top bar (artboards 08/09), floating assistant, toast, route container. */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; overflow: hidden; font: 14px/1.35 var(--font); color: #fff; background: #2b3036; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent-hi); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.topbar { height: var(--topbar-h); background: var(--brand); display: flex; align-items: center; gap: 18px; padding: 0 16px; position: relative; z-index: 30; }
.topbar .sub { font-size: 15px; font-weight: 700; color: #fff; white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

#tabs { display: flex; gap: 2px; flex: none; }
#tabs a { padding: 8px 12px; border-radius: var(--pill); color: #e9ebef; text-decoration: none; font-weight: 700; font-size: 14px; white-space: nowrap; }
#tabs a:hover { background: rgba(255, 255, 255, .08); }
#tabs a[aria-current] { background: var(--accent); color: #fff; box-shadow: var(--extrude); }

.topbar .status { margin-left: auto; display: flex; gap: 8px; flex: none; }
.topbar .pill { border: 1px solid rgba(255, 255, 255, .25); border-radius: var(--pill); padding: 5px 11px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.topbar .pill i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-right: 6px; }
.topbar .pill.al { border-color: var(--crit); color: #ffb3ae; }
.topbar .pill.next { font-family: var(--mono); font-weight: 500; }

.usermenu { position: relative; flex: none; }
.topbar .user { border: 1px solid rgba(255, 255, 255, .35); border-radius: 8px; padding: 6px 12px; font-weight: 700; font-size: 13px; background: none; white-space: nowrap; }
.topbar .user:hover { background: rgba(255, 255, 255, .08); }
.usermenu__list { position: absolute; right: 0; top: calc(100% + 8px); min-width: 250px; margin: 0; padding: 6px; list-style: none; background: var(--glass); border: 1px solid var(--glass-line); border-radius: var(--radius); backdrop-filter: blur(10px); box-shadow: var(--raised); }
.usermenu__list[hidden] { display: none; }
.usermenu__list button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 8px; font-weight: 600; }
.usermenu__list button small { display: block; font-weight: 500; color: rgba(255, 255, 255, .7); }
.usermenu__list button:hover { background: rgba(255, 255, 255, .08); }
.usermenu__list button[aria-current] { background: rgba(31, 63, 168, .55); }

/* Route container: everything below the top bar. */
#view { position: absolute; inset: var(--topbar-h) 0 0 0; }
.scene-host { position: absolute; inset: 0; overflow: hidden; }
.scene-fallback { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(135deg, #25292e, #1c1f23); }
.scene-fallback { --text: #1b1c20; --mute: #4c5059; }
.scene-fallback .pcard { max-width: 440px; text-align: center; }

.asst { position: fixed; right: 20px; bottom: 20px; z-index: 40; background: var(--accent); color: #fff; border: 0; border-radius: var(--pill); padding: 12px 20px; font-weight: 800; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.asst:hover { background: var(--accent-hi); }

.toast { position: fixed; right: 20px; bottom: 76px; z-index: 50; background: var(--card); color: var(--text); border-radius: var(--radius); padding: 10px 16px; font-weight: 700; box-shadow: var(--raised); }
.toast[hidden] { display: none; }

@media (max-width: 1280px) { .topbar .sub { display: none; } }
@media (max-width: 1250px) { .topbar .pill.next { display: none; } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
