/* ═══════════════════════════════════════════════════════════════
   DAMAS Design System v2 — CHROME (sidebar / topbar / ticker)
   ───────────────────────────────────────────────────────────────
   Estrutura visual que aparece em todas as telas. Importe DEPOIS
   de tokens + componentes.

   Estrutura HTML esperada:
   <div class="app">
     <aside class="sb">…sidebar…</aside>
     <div class="main">
       <header class="tb">…topbar…</header>
       <div class="tape">…ticker (opcional)…</div>
       <main class="content">…páginas…</main>
     </div>
   </div>
   ═══════════════════════════════════════════════════════════════ */

.app {
  display: grid;
  grid-template-columns: var(--sb-w) 1fr;
  height: 100vh;
  background: var(--bg-0);
}
.app.sb-open { grid-template-columns: var(--sb-w-open) 1fr; }

/* ── SIDEBAR ── */
.sb {
  display: flex; flex-direction: column;
  background: var(--bg-1);
  border-right: 1px solid var(--line);
  overflow: hidden;
  transition: width 0.18s ease;
  width: var(--sb-w);
}
.sb:hover { width: var(--sb-w-open); }
.sb-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--line);
}
.sb-mark {
  width: 28px; height: 28px;
  background: var(--accent); color: var(--on-accent);
  border-radius: 6px;
  display: grid; place-items: center;
  font: 700 13px var(--ff-sans);
  flex-shrink: 0;
}
.sb-name {
  font: 500 14px var(--ff-sans);
  color: var(--ink-0);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.15s ease 0.05s;
}
.sb:hover .sb-name { opacity: 1; }

.sb-nav { flex: 1; overflow-y: auto; padding: 8px 0; }
.sb-section {
  font: 500 9.5px var(--ff-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 12px 16px 6px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.15s ease 0.05s;
}
.sb:hover .sb-section { opacity: 1; }
.sb-item {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 18px;
  color: var(--ink-2);
  cursor: pointer;
  white-space: nowrap;
  border-left: 2px solid transparent;
}
.sb-item:hover { color: var(--ink-0); background: var(--bg-2); }
.sb-item.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: var(--accent-soft);
}
.sb-item .lbl {
  font-size: 13px;
  opacity: 0;
  transition: opacity 0.15s ease 0.05s;
}
.sb:hover .sb-item .lbl { opacity: 1; }

.sb-foot {
  position: relative;
  padding: 8px;
  border-top: 1px solid var(--line);
}
.sb-foot-btn {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 6px 8px;
  background: transparent;
  border: 1px solid transparent; border-radius: 8px;
  cursor: pointer; text-align: left;
  font-family: inherit; color: inherit;
}
.sb-foot-btn:hover { background: var(--bg-2); }
.sb-foot-btn.open { background: var(--bg-2); border-color: var(--line); }
.sb-avatar {
  width: 28px; height: 28px;
  background: var(--bg-3);
  border: 1px solid var(--line-strong);
  display: grid; place-items: center;
  font: 600 11px var(--ff-sans);
  color: var(--ink-1);
  flex-shrink: 0;
}

/* ── TOPBAR ── */
.tb {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--tb-h);
  padding: 0 24px;
  background: var(--bg-0);
  border-bottom: 1px solid var(--line);
}
.tb-crumbs {
  font: 500 11px var(--ff-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.tb-actions { display: flex; align-items: center; gap: 8px; }

/* ── TICKER (opcional) ── */
.tape {
  height: var(--tape-h);
  background: var(--bg-1);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center;
  font: 11px var(--ff-mono);
  color: var(--ink-2);
  overflow: hidden;
  white-space: nowrap;
}

/* ── CONTEÚDO ── */
.main { display: flex; flex-direction: column; overflow: hidden; }
.content { flex: 1; overflow-y: auto; padding: 24px 32px; }
