.app-shell { display: flex; min-height: 100vh; }

/* ============ Sidebar (vault: Padrao_Menu_Sidebar, tema claro) ============ */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-elev);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 40;
}

/* Marca (logo + nome) */
.sidebar-marca {
  padding: 20px 18px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}
.sidebar-marca .logo-quadro {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent);
  display: grid; place-items: center;
  color: var(--accent);
  flex-shrink: 0;
  overflow: hidden;
}
.sidebar-marca .logo-quadro i { font-size: 22px; }
.sidebar-marca .logo-quadro img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-marca .marca-nome { font-weight: 700; font-size: 15px; letter-spacing: -.02em; line-height: 1.1; }
.sidebar-marca .marca-sub { font-size: 11px; color: var(--text-dim); font-weight: 500; }

/* Navegacao */
.sidebar-nav { flex: 1; padding: 14px 12px; overflow-y: auto; }
.sidebar-nav .grupo { margin-bottom: 2px; }
.sidebar-nav .grupo-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-dim);
  padding: 14px 10px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-weight: 500;
  font-size: 13px;
  margin-bottom: 1px;
}
.nav-item i { font-size: 16px; opacity: .85; }
.nav-item span { flex: 1; }
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item.ativo { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-item.ativo i { opacity: 1; }

/* Em breve (esmaecido, sem clique) */
.nav-item.esmaecido { color: var(--text-dim); cursor: not-allowed; opacity: .55; }
.tag-em-breve {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--surface);
  color: var(--text-dim);
  padding: 2px 7px;
  border-radius: 999px;
  flex: none;
}

/* Rodape (vault: Padrao_Sidebar_Rodape) */
.sidebar-rodape { padding: 12px; border-top: 1px solid var(--border); }
.btn-home-side {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  margin-bottom: 8px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 2px 8px rgba(255, 117, 0, .15);
}
.btn-home-side:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(255, 117, 0, .25);
}
.btn-home-side.ativo {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .4), 0 2px 8px rgba(255, 117, 0, .25);
}
.btn-home-side i { font-size: 17px; flex-shrink: 0; }

.usuario-box { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); }
.avatar {
  width: 34px; height: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 13px;
  flex-shrink: 0;
}
.usuario-box .info { min-width: 0; flex: 1; }
.usuario-box .info .nome { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.usuario-box .info .papel { font-size: 11px; color: var(--text-dim); }

.btn-fantasma { background: transparent; border: 1px solid transparent; color: var(--text-dim); border-radius: var(--radius-sm); }
.btn-fantasma:hover { background: var(--surface); color: var(--text); }
.btn-icone { padding: 7px; display: inline-flex; }
.btn-icone i { font-size: 16px; }

/* ============ Area principal ============ */
/* min-width: 0 impede que conteudo largo (kanban, tabela) estoure o flex item;
   o scroll fica dentro do proprio container (.kanban-wrap etc). */
.main { flex: 1; min-width: 0; margin-left: var(--sidebar-w); }

.topbar {
  height: var(--topbar-h);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--sp-5);
  background: var(--surface-glass);
  backdrop-filter: var(--blur);
  position: sticky; top: 0; z-index: 10;
}
.topbar-esq { display: flex; align-items: center; gap: 10px; }
.topbar-titulo { font-size: var(--fs-lg); font-weight: 600; }
.topbar-acoes { display: flex; align-items: center; gap: 8px; }

/* Telas estreitas: botoes da topbar viram icon-only pra nao estourar a faixa
   (vault: Responsividade_Sempre). font-size 0 esconde o texto, icone volta. */
@media (max-width: 600px) {
  .topbar-acoes .btn { font-size: 0; gap: 0; padding: 0 10px; }
  .topbar-acoes .btn i { font-size: 17px; }
}

.content { padding: var(--sp-5); }

.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-5); }

/* ============ Mobile: sidebar vira drawer (vault: Responsividade_Sempre) ============ */
.btn-menu {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 20px;
  padding: 6px 10px;
  cursor: pointer;
}
.overlay-mob {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .5);
  z-index: 39;
}
.overlay-mob.visivel { display: block; }

@media (max-width: 880px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.aberta { transform: translateX(0); }
  .main { margin-left: 0; }
  .btn-menu { display: inline-flex; }
  .content { padding: var(--sp-4); }
}
body.drawer-aberto { overflow: hidden; }

@media (max-width: 720px) {
  .btn { min-height: 44px; }
}

/* Tela de login (sem shell) */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--bg);
}
.login-box { width: 380px; }
.login-box .logo { text-align: center; font-size: var(--fs-2xl); font-weight: 700; color: var(--accent); margin-bottom: var(--sp-5); }
