/* Casca: menu lateral com três seções, conta no rodapé, topo com Seção / Página e barra inferior no celular. */
:root { --side-w: 224px; --top-h: 60px; --side-bg: #0d1829; --side-line: #1d2b42; --side-hover: #15233a; --side-active: #1b2e4d; --edge-line: var(--theme-light, #f0c8c5) var(--theme-dark, #5c2b28); --edge-line-warn: var(--theme-light, #ecd6a6) var(--theme-dark, #5a4518); }

.side { padding: 18px var(--space-3) var(--space-3); gap: var(--space-1); border-right: 0; }
.side .brand { padding: 2px 10px 22px; }
.side-head { display: block; }
.side-nav { display: flex; flex-direction: column; gap: var(--space-1); }
.side-nav a { min-height: 42px; padding: 0 var(--space-3); border-radius: var(--radius-control); font-size: var(--text-base); }
.side-nav a:hover { background: var(--side-hover); color: var(--side-ink-strong); }
.side-nav a[aria-current="page"] { background: var(--side-active); color: var(--side-ink-strong); font-weight: var(--weight-semibold); }
.side-nav a[aria-current="page"]::before { display: none; }
.side-foot { margin-top: auto; border-top: 0; padding-top: 0; }
.side-account { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--radius-control); color: var(--side-ink); text-decoration: none; }
.side-account:hover, .side-account[aria-current="page"] { background: var(--side-hover); }
.side-account .who { min-width: 0; flex: 1; }
.side-account .who b { display: block; color: var(--side-ink-strong); font-size: var(--text-md); font-weight: var(--weight-semibold); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-account .who span { display: block; font-size: var(--text-xs); white-space: nowrap; }
.side-account > svg { width: 18px; height: 18px; flex: none; }

.main-col { margin-left: var(--side-w); }
.topbar { height: var(--top-h); padding: 0 32px; background: var(--surface); gap: 10px; z-index: 1000; }
.topbar .launch-top, .view-only .assist-fab { margin-left: auto; }
#status { margin-left: auto; }
#status + .launch-top { margin-left: var(--space-2); }
#status:not([hidden]) ~ .launch-top { margin-left: var(--space-2); }
.crumb { gap: 10px; flex: 0 1 auto; min-width: 0; }
.crumb h1 { font-family: var(--font-display); font-weight: var(--weight-semibold); font-size: 21px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumb h1:focus { outline: none; }
.crumb .up { color: var(--ink-3); font-family: var(--font-display); font-weight: var(--weight-semibold); font-size: 21px; text-decoration: none; white-space: nowrap; }
.crumb .up:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.crumb .sep { color: var(--line); font-size: 21px; }
.crumb .back-m { display: none; }

main#app { padding: var(--space-6) 32px 48px; max-width: 1480px; }
main#app:has(.fleet) { max-width: 1480px; padding-bottom: 48px; }

.bottom-nav { display: none; }

@media (max-width: 899px) {
  .side { display: none; }
  .main-col { margin-left: 0; }
  .topbar { padding: 0 var(--space-4); padding-top: env(safe-area-inset-top); height: calc(var(--top-h) + env(safe-area-inset-top)); }
  .topbar .launch-top { padding-inline: var(--space-3); }
  .crumb h1 { font-size: 19px; }
  .crumb .up, .crumb .sep { display: none; }
  .crumb .back-m { display: inline-flex; width: 32px; height: 32px; margin-left: -6px; border: 0; background: none; font-size: 20px; color: var(--ink-2); }
  main#app, main#app:has(.fleet) { padding: var(--space-4) var(--space-4) calc(88px + env(safe-area-inset-bottom)); }
  .bottom-nav { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; inset: auto 0 0; z-index: 1100; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .bottom-nav a { display: grid; justify-items: center; align-content: center; gap: 2px; min-height: 56px; font-size: var(--text-xs); font-weight: var(--weight-semibold); color: var(--ink-3); text-decoration: none; }
  .bottom-nav a[aria-current="page"] { color: var(--brand); }
  .bottom-nav svg { width: 22px; height: 22px; }
  .topbar h1 { white-space: normal; line-height: 1.1; }
}
